mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #6957 from ethereum/useWhat
Use "what" in exception reports.
This commit is contained in:
commit
2c61bdd207
@ -769,6 +769,15 @@ Json::Value StandardCompiler::compileSolidity(StandardCompiler::InputsAndSetting
|
|||||||
"Exception during compilation: " + boost::diagnostic_information(_exception)
|
"Exception during compilation: " + boost::diagnostic_information(_exception)
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
catch (std::exception const& _e)
|
||||||
|
{
|
||||||
|
errors.append(formatError(
|
||||||
|
false,
|
||||||
|
"Exception",
|
||||||
|
"general",
|
||||||
|
"Unknown exception during compilation" + (_e.what() ? ": " + string(_e.what()) : ".")
|
||||||
|
));
|
||||||
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
errors.append(formatError(
|
errors.append(formatError(
|
||||||
|
@ -989,6 +989,13 @@ bool CommandLineInterface::processInput()
|
|||||||
serr() << "Exception during compilation: " << boost::diagnostic_information(_exception) << endl;
|
serr() << "Exception during compilation: " << boost::diagnostic_information(_exception) << endl;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
catch (std::exception const& _e)
|
||||||
|
{
|
||||||
|
serr() << "Unknown exception during compilation" << (
|
||||||
|
_e.what() ? ": " + string(_e.what()) : "."
|
||||||
|
) << endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
serr() << "Unknown exception during compilation." << endl;
|
serr() << "Unknown exception during compilation." << endl;
|
||||||
@ -1279,6 +1286,14 @@ bool CommandLineInterface::assemble(
|
|||||||
serr() << "Exception in assembler: " << boost::diagnostic_information(_exception) << endl;
|
serr() << "Exception in assembler: " << boost::diagnostic_information(_exception) << endl;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
catch (std::exception const& _e)
|
||||||
|
{
|
||||||
|
serr() <<
|
||||||
|
"Unknown exception during compilation" <<
|
||||||
|
(_e.what() ? ": " + string(_e.what()) : ".") <<
|
||||||
|
endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
serr() << "Unknown exception in assembler." << endl;
|
serr() << "Unknown exception in assembler." << endl;
|
||||||
@ -1329,6 +1344,13 @@ bool CommandLineInterface::assemble(
|
|||||||
serr() << "Exception while assembling: " << boost::diagnostic_information(_exception) << endl;
|
serr() << "Exception while assembling: " << boost::diagnostic_information(_exception) << endl;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
catch (std::exception const& _e)
|
||||||
|
{
|
||||||
|
serr() << "Unknown exception during compilation" << (
|
||||||
|
_e.what() ? ": " + string(_e.what()) : "."
|
||||||
|
) << endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
serr() << "Unknown exception while assembling." << endl;
|
serr() << "Unknown exception while assembling." << endl;
|
||||||
|
@ -182,7 +182,7 @@ TestTool::Result TestTool::process()
|
|||||||
else
|
else
|
||||||
return Result::Skipped;
|
return Result::Skipped;
|
||||||
}
|
}
|
||||||
catch(boost::exception const& _e)
|
catch (boost::exception const& _e)
|
||||||
{
|
{
|
||||||
AnsiColorized(cout, formatted, {BOLD, RED}) <<
|
AnsiColorized(cout, formatted, {BOLD, RED}) <<
|
||||||
"Exception during test: " << boost::diagnostic_information(_e) << endl;
|
"Exception during test: " << boost::diagnostic_information(_e) << endl;
|
||||||
@ -191,7 +191,9 @@ TestTool::Result TestTool::process()
|
|||||||
catch (std::exception const& _e)
|
catch (std::exception const& _e)
|
||||||
{
|
{
|
||||||
AnsiColorized(cout, formatted, {BOLD, RED}) <<
|
AnsiColorized(cout, formatted, {BOLD, RED}) <<
|
||||||
"Exception during test: " << _e.what() << endl;
|
"Exception during test" <<
|
||||||
|
(_e.what() ? ": " + string(_e.what()) : ".") <<
|
||||||
|
endl;
|
||||||
return Result::Exception;
|
return Result::Exception;
|
||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
|
Loading…
Reference in New Issue
Block a user