diff options
author | chriseth <chris@ethereum.org> | 2017-07-06 01:46:10 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-06 01:46:10 +0800 |
commit | a6b632811ff748984c4ee0ef0b87b2818117426d (patch) | |
tree | b69a620db28f036fe22bca781e1ed2d3dcad8000 | |
parent | 3e3a0487792e63c6cf1553425b1ea2ee9ca90a1d (diff) | |
parent | 75f7f7e1e69329ec0413e51979fefd23c9b982f7 (diff) | |
download | dexon-solidity-a6b632811ff748984c4ee0ef0b87b2818117426d.tar dexon-solidity-a6b632811ff748984c4ee0ef0b87b2818117426d.tar.gz dexon-solidity-a6b632811ff748984c4ee0ef0b87b2818117426d.tar.bz2 dexon-solidity-a6b632811ff748984c4ee0ef0b87b2818117426d.tar.lz dexon-solidity-a6b632811ff748984c4ee0ef0b87b2818117426d.tar.xz dexon-solidity-a6b632811ff748984c4ee0ef0b87b2818117426d.tar.zst dexon-solidity-a6b632811ff748984c4ee0ef0b87b2818117426d.zip |
Merge pull request #2524 from ethereum/doNotOmitErrorType
Do not omit error type.
-rw-r--r-- | Changelog.md | 1 | ||||
-rw-r--r-- | libsolidity/interface/StandardCompiler.cpp | 8 |
2 files changed, 5 insertions, 4 deletions
diff --git a/Changelog.md b/Changelog.md index b4415978..de4207a9 100644 --- a/Changelog.md +++ b/Changelog.md @@ -2,6 +2,7 @@ Bugfixes: * Code Generator: Correctly unregister modifier variables. + * Error Output: Do not omit the error type. ### 0.4.12 (2017-07-03) diff --git a/libsolidity/interface/StandardCompiler.cpp b/libsolidity/interface/StandardCompiler.cpp index e677afc8..1f51851d 100644 --- a/libsolidity/interface/StandardCompiler.cpp +++ b/libsolidity/interface/StandardCompiler.cpp @@ -71,7 +71,7 @@ Json::Value formatErrorWithException( ) { string message; - string formattedMessage = SourceReferenceFormatter::formatExceptionInformation(_exception, _message, _scannerFromSourceName); + string formattedMessage = SourceReferenceFormatter::formatExceptionInformation(_exception, _type, _scannerFromSourceName); // NOTE: the below is partially a copy from SourceReferenceFormatter SourceLocation const* location = boost::get_error_info<errinfo_sourceLocation>(_exception); @@ -271,12 +271,12 @@ Json::Value StandardCompiler::compileInternal(Json::Value const& _input) for (auto const& error: m_compilerStack.errors()) { - auto err = dynamic_pointer_cast<Error const>(error); + Error const& err = dynamic_cast<Error const&>(*error); errors.append(formatErrorWithException( *error, - err->type() == Error::Type::Warning, - err->typeName(), + err.type() == Error::Type::Warning, + err.typeName(), "general", "", scannerFromSourceName |