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.
This commit is contained in:
chriseth
2015-10-16 14:52:01 +02:00
parent 52eaa477d4
commit 7b56206a98
4 changed files with 15 additions and 9 deletions
+3 -5
View File
@@ -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;
}
}