mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Better error message if loading fails.
This commit is contained in:
parent
f3f3cac864
commit
1258aabee7
@ -45,6 +45,13 @@ evmc::vm* EVMHost::getVM(string const& _path)
|
||||
evmc_instance* vm = evmc_load_and_create(_path.c_str(), &errorCode);
|
||||
if (vm && errorCode == EVMC_LOADER_SUCCESS)
|
||||
theVM = make_unique<evmc::vm>(vm);
|
||||
else
|
||||
{
|
||||
cerr << "Error loading VM from " << _path;
|
||||
if (char const* errorMsg = evmc_last_error_msg())
|
||||
cerr << ":" << endl << errorMsg;
|
||||
cerr << endl;
|
||||
}
|
||||
}
|
||||
return theVM.get();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user