Support catching YulException nicely in StandardCompiler

This commit is contained in:
Alex Beregszaszi 2019-12-03 19:05:58 +01:00
parent 7e8f0a17bc
commit 9140a7d64e

View File

@ -24,6 +24,7 @@
#include <libsolidity/ast/ASTJsonConverter.h>
#include <libyul/AssemblyStack.h>
#include <libyul/Exceptions.h>
#include <liblangutil/SourceReferenceFormatter.h>
#include <libevmasm/Instruction.h>
#include <libdevcore/JSON.h>
@ -817,6 +818,16 @@ Json::Value StandardCompiler::compileSolidity(StandardCompiler::InputsAndSetting
"Unimplemented feature (" + _exception.lineInfo() + ")"
));
}
catch (yul::YulException const& _exception)
{
errors.append(formatErrorWithException(
_exception,
false,
"YulException",
"general",
"Yul exception"
));
}
catch (Exception const& _exception)
{
errors.append(formatError(