Prepare for leaky exceptions

Now toFormalType() reports errors by exceptions, they will be
sometimes leaked to the wider context.  This commits adds a catch.
This commit is contained in:
Yoichi Hirai 2016-09-08 09:47:01 +02:00
parent ac7c6ae7d2
commit 4337e70cca

View File

@ -36,6 +36,10 @@ bool Why3Translator::process(SourceUnit const& _source)
appendPreface();
_source.accept(*this);
}
catch (NoFormalType&)
{
solAssert(false, "There is a call to toFormalType() that does not catch NoFormalType exceptions.");
}
catch (FatalError& /*_e*/)
{
solAssert(m_errorOccured, "");