diff options
author | chriseth <c@ethdev.com> | 2015-10-16 20:52:01 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2015-10-16 20:52:01 +0800 |
commit | 7b56206a9809c12d9c6e94a0f1dd43f40506c9b5 (patch) | |
tree | 9f32c0bfa6c32fa341ebd112db4c32fddc732b53 /libsolidity/Parser.cpp | |
parent | 52eaa477d4bd9ad2f591148727d1ac9fd500d283 (diff) | |
download | dexon-solidity-7b56206a9809c12d9c6e94a0f1dd43f40506c9b5.tar.gz dexon-solidity-7b56206a9809c12d9c6e94a0f1dd43f40506c9b5.tar.zst dexon-solidity-7b56206a9809c12d9c6e94a0f1dd43f40506c9b5.zip |
Do not catch InternalCompilerErrors as part of fatal error handling.
InternalCompilerErrors always have to end the whole compilation process because a serious inconsistency was detected.
Diffstat (limited to 'libsolidity/Parser.cpp')
-rw-r--r-- | libsolidity/Parser.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/libsolidity/Parser.cpp b/libsolidity/Parser.cpp index 1bb16b84..f7e17b42 100644 --- a/libsolidity/Parser.cpp +++ b/libsolidity/Parser.cpp @@ -88,12 +88,10 @@ ASTPointer<SourceUnit> Parser::parse(shared_ptr<Scanner> const& _scanner) } return nodeFactory.createNode<SourceUnit>(nodes); } - catch(FatalError const& _error) - { - return nullptr; - } - catch(Exception const& _e) + catch (FatalError const& _error) { + if (m_errors.empty()) + throw; // Something is weird here, rather throw again. return nullptr; } } |