diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-04-25 05:49:50 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-04-25 05:49:50 +0800 |
commit | 5e7a643051b67c43eaaab69dce6c99a503a44820 (patch) | |
tree | ca01463635ad6d246bc7ffa6471d979326dafc52 /libsolidity/interface/StandardCompiler.cpp | |
parent | 2f66c69bd107928ede7b52d1404fdf7e94c84a28 (diff) | |
download | dexon-solidity-5e7a643051b67c43eaaab69dce6c99a503a44820.tar.gz dexon-solidity-5e7a643051b67c43eaaab69dce6c99a503a44820.tar.zst dexon-solidity-5e7a643051b67c43eaaab69dce6c99a503a44820.zip |
Catch jsoncpp exceptions
Diffstat (limited to 'libsolidity/interface/StandardCompiler.cpp')
-rw-r--r-- | libsolidity/interface/StandardCompiler.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libsolidity/interface/StandardCompiler.cpp b/libsolidity/interface/StandardCompiler.cpp index a1e6deb0..2b5e861b 100644 --- a/libsolidity/interface/StandardCompiler.cpp +++ b/libsolidity/interface/StandardCompiler.cpp @@ -458,6 +458,14 @@ Json::Value StandardCompiler::compile(Json::Value const& _input) { return compileInternal(_input); } + catch (Json::LogicError const& _exception) + { + return formatFatalError("InternalCompilerError", string("JSON logic exception: ") + _exception.what()); + } + catch (Json::RuntimeError const& _exception) + { + return formatFatalError("InternalCompilerError", string("JSON runtime exception: ") + _exception.what()); + } catch (Exception const& _exception) { return formatFatalError("InternalCompilerError", "Internal exception in StandardCompiler::compileInternal: " + boost::diagnostic_information(_exception)); |