mirror of
https://github.com/aljazceru/python-teos.git
synced 2025-12-18 14:44:21 +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")
|
logger.error("bitcoind is running on a different network, check conf.py and bitcoin.conf. Shutting down")
|
||||||
|
|
||||||
else:
|
else:
|
||||||
# Fire the api
|
try:
|
||||||
start_api()
|
# 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