Skip to content

Commit

Permalink
Catch and log service init errors
Browse files Browse the repository at this point in the history
  • Loading branch information
NeonDaniel committed Sep 14, 2024
1 parent 7978d6f commit 48729aa
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions neon_audio/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,20 @@ def main(*args, **kwargs):
check_for_signal("isSpeaking")
Lock("audio")
setup_locale()
service = NeonPlaybackService(*args, **kwargs)
service.start()
wait_for_exit_signal()
try:
service = NeonPlaybackService(*args, **kwargs)
service.start()
wait_for_exit_signal()
except Exception as e:
LOG.exception(e)
service = None
if malloc_running:
try:
print_malloc(snapshot_malloc())
except Exception as e:
LOG.error(e)
service.shutdown()
if service:
service.shutdown()


def deprecated_entrypoint():
Expand Down

0 comments on commit 48729aa

Please sign in to comment.