Merge pull request #2524 from ethereum/doNotOmitErrorType

Do not omit error type.
This commit is contained in:
chriseth 2017-07-05 19:46:10 +02:00 committed by GitHub
commit a6b632811f
2 changed files with 5 additions and 4 deletions

View File

@ -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)

View File

@ -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