isoltest: WhiskersError and YulException treated differently when enforcing viaYul

This commit is contained in:
Djordje Mijovic 2020-05-11 09:26:27 +02:00
parent 4e58c672bb
commit 591a5fff07

View File

@ -13,6 +13,8 @@
*/
#include <test/libsolidity/SemanticTest.h>
#include <libsolutil/Whiskers.h>
#include <libyul/Exceptions.h>
#include <test/Common.h>
#include <boost/algorithm/string.hpp>
#include <boost/algorithm/string/predicate.hpp>
@ -27,6 +29,7 @@
using namespace std;
using namespace solidity;
using namespace solidity::yul;
using namespace solidity::util;
using namespace solidity::util::formatting;
using namespace solidity::frontend::test;
@ -201,6 +204,16 @@ TestCase::TestResult SemanticTest::run(ostream& _stream, string const& _linePref
return TestResult::Failure;
}
}
catch (WhiskersError const&)
{
// this is an error in Whiskers template, so should be thrown anyway
throw;
}
catch (YulException const&)
{
// this should be an error in yul compilation or translation
throw;
}
catch (boost::exception const&)
{
if (compileViaYul && !m_runWithYul)