diff --git a/pisa/pisad.py b/pisa/pisad.py index 5ae3348..578279b 100644 --- a/pisa/pisad.py +++ b/pisa/pisad.py @@ -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: - # Fire the api - start_api() + try: + # Fire the api + start_api() + except Exception as e: + logger.error("An error occurred: {}. Shutting down".format(e)) + exit(1)