Handle database sync exceptions

pull/53/head
Bernhard Mueller 7 years ago
parent 0589c2c722
commit e2972e8262
  1. 8
      myth

@ -185,7 +185,13 @@ if args.search or args.init_db:
exitWithError("Syntax error in search expression.")
elif (args.init_db):
contract_storage.initialize(eth, args.sync_all)
try:
contract_storage.initialize(eth, args.sync_all)
except FileNotFoundError as e:
print("Error syncing database over IPC: " + str(e))
except ConnectionError as e:
print("Could not connect to RPC server. Make sure that your node is running and that RPC parameters are set correctly.")
sys.exit()

Loading…
Cancel
Save