@@ -61,9 +61,14 @@ bool NameAndTypeResolver::registerDeclarations(SourceUnit& _sourceUnit, ASTNode
6161 {
6262 DeclarationRegistrationHelper registrar (m_scopes, _sourceUnit, m_errorReporter, m_globalContext, _currentScope);
6363 }
64- catch (langutil:: FatalError const & error )
64+ catch (FatalError const &)
6565 {
66- solAssert (m_errorReporter.hasErrors (), " Unreported fatal error: " s + error.what ());
66+ if (!m_errorReporter.hasErrors ())
67+ {
68+ std::cerr << " Unreported fatal error:" << std::endl;
69+ std::cerr << boost::current_exception_diagnostic_information () << std::endl;
70+ solAssert (false , " Unreported fatal error." );
71+ }
6772 return false ;
6873 }
6974 return true ;
@@ -135,9 +140,14 @@ bool NameAndTypeResolver::resolveNamesAndTypes(SourceUnit& _source)
135140 return false ;
136141 }
137142 }
138- catch (langutil:: FatalError const & error )
143+ catch (FatalError const &)
139144 {
140- solAssert (m_errorReporter.hasErrors (), " Unreported fatal error: " s + error.what ());
145+ if (!m_errorReporter.hasErrors ())
146+ {
147+ std::cerr << " Unreported fatal error:" << std::endl;
148+ std::cerr << boost::current_exception_diagnostic_information () << std::endl;
149+ solAssert (false , " Unreported fatal error." );
150+ }
141151 return false ;
142152 }
143153 return true ;
@@ -150,9 +160,14 @@ bool NameAndTypeResolver::updateDeclaration(Declaration const& _declaration)
150160 m_scopes[nullptr ]->registerDeclaration (_declaration, false , true );
151161 solAssert (_declaration.scope () == nullptr , " Updated declaration outside global scope." );
152162 }
153- catch (langutil:: FatalError const & error )
163+ catch (FatalError const &)
154164 {
155- solAssert (m_errorReporter.hasErrors (), " Unreported fatal error: " s + error.what ());
165+ if (!m_errorReporter.hasErrors ())
166+ {
167+ std::cerr << " Unreported fatal error:" << std::endl;
168+ std::cerr << boost::current_exception_diagnostic_information () << std::endl;
169+ solAssert (false , " Unreported fatal error." );
170+ }
156171 return false ;
157172 }
158173 return true ;
0 commit comments