tCatch any errors raised by main() - electrum-personal-server - Maximally lightweight electrum server for a single user
HTML git clone https://git.parazyd.org/electrum-personal-server
DIR Log
DIR Files
DIR Refs
DIR README
---
DIR commit 7de4914ff57bff1e5b5b06c1e3cadd4fbd1e712f
DIR parent 6cb6201d51b241fe4a9af8c237100f8dd15a6eed
HTML Author: chris-belcher <chris-belcher@users.noreply.github.com>
Date: Thu, 25 Feb 2021 21:18:33 +0000
Catch any errors raised by main()
Previously if main() had raised some kind of error then the
application would exit without calling PAUSE on windows. Then
tthe user wouldnt be able to read the error message.
Diffstat:
M electrumpersonalserver/server/comm… | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
DIR diff --git a/electrumpersonalserver/server/common.py b/electrumpersonalserver/server/common.py
t@@ -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':