Skip to content

Commit

Permalink
fix(main): improve handling of launch failures
Browse files Browse the repository at this point in the history
  • Loading branch information
tysmith committed Jan 11, 2025
1 parent 60ae99e commit 91e6720
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ffpuppet/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

from .bootstrapper import Bootstrapper
from .core import Debugger, FFPuppet, Reason
from .exceptions import BrowserExecutionError
from .exceptions import LaunchError
from .helpers import certutil_available, certutil_find
from .profile import Profile

Expand Down Expand Up @@ -344,11 +344,11 @@ def main(argv: list[str] | None = None) -> None:
LOG.info("Running Firefox (pid: %d)...", ffp.get_pid())
while ffp.is_healthy():
sleep(args.poll_interval)
except BrowserExecutionError:
LOG.error("Cannot execute binary. Perhaps required libraries are missing?")
except KeyboardInterrupt:
user_exit = True
LOG.info("Ctrl+C detected.")
except LaunchError as exc:
LOG.error("Launch failed: %s", exc)
finally:
LOG.info("Shutting down...")
ffp.close()
Expand Down

0 comments on commit 91e6720

Please sign in to comment.