def main(): # pragma: no cover """ A wrapper for the program entrypoint that formats uncaught exceptions in a crash report template. """ settings = SettingStore() try: settings.load() except MnamerException as e: tty.error(e) raise SystemExit(2) try: frontend = Cli(settings) frontend.launch() except SystemExit: raise except: if IS_DEBUG: # allow exceptions to raised when debugging raise else: # wrap exceptions in crash report under normal operation tty.crash_report()
def __init__(self, settings: SettingStore): super().__init__(settings) if not settings.targets: tty.error(USAGE) raise SystemExit(2) self.success_count = 0