Skip to content

Commit

Permalink
Catch any errors raised by main()
Browse files Browse the repository at this point in the history
Previously if main() had raised some kind of error then the
application would exit without calling PAUSE on windows. Then
the user wouldnt be able to read the error message.
  • Loading branch information
chris-belcher committed Mar 4, 2021
1 parent 6cb6201 commit 7de4914
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion electrumpersonalserver/server/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,10 @@ def rescan_script(logger, rpc, rescan_date):

if __name__ == "__main__":
#entry point for pyinstaller executable
res = main()
try:
res = main()
except:
res = 1

# only relevant for pyinstaller executables (on Windows):
if os.name == 'nt':
Expand Down

0 comments on commit 7de4914

Please sign in to comment.