Exception handling fix

pull/646/head
Nikhil Parasaram 6 years ago
parent 3aeaf59bea
commit a8f6c477c8
  1. 4
      mythril/laser/ethereum/call.py
  2. 4
      mythril/laser/ethereum/instructions.py

@ -123,8 +123,8 @@ def get_callee_account(global_state, callee_address, dynamic_loader):
try:
code = dynamic_loader.dynld(environment.active_account.address, callee_address)
except ValueError as error:
logging.debug("Unable to execute dynamic loader because: {}".format(error.message))
raise ValueError(error.message)
logging.debug("Unable to execute dynamic loader because: {}".format(str(error)))
raise ValueError(str(error))
if code is None:
logging.debug("No code returned, not a contract account?")
raise ValueError()

@ -701,8 +701,8 @@ class Instruction:
try:
code = self.dynamic_loader.dynld(environment.active_account.address, addr)
except ValueError as e:
logging.info("error accessing contract storage due to: " + str(e.message))
except (ValueError, AttributeError) as e:
logging.info("error accessing contract storage due to: " + str(e))
state.stack.append(global_state.new_bitvec("extcodesize_" + str(addr), 256))
return [global_state]

Loading…
Cancel
Save