mirror of
https://github.com/aljazceru/python-teos.git
synced 2025-12-18 06:34:19 +01:00
Catching and logging when start_api raises an exception
This commit is contained in:
@@ -36,5 +36,9 @@ if __name__ == '__main__':
|
||||
logger.error("bitcoind is running on a different network, check conf.py and bitcoin.conf. Shutting down")
|
||||
|
||||
else:
|
||||
try:
|
||||
# Fire the api
|
||||
start_api()
|
||||
except Exception as e:
|
||||
logger.error("An error occurred: {}. Shutting down".format(e))
|
||||
exit(1)
|
||||
|
||||
Reference in New Issue
Block a user