From 4337e70cca58c02de15af258a0efc29062aa0a36 Mon Sep 17 00:00:00 2001 From: Yoichi Hirai Date: Thu, 8 Sep 2016 09:47:01 +0200 Subject: Prepare for leaky exceptions Now toFormalType() reports errors by exceptions, they will be sometimes leaked to the wider context. This commits adds a catch. --- libsolidity/formal/Why3Translator.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libsolidity/formal') diff --git a/libsolidity/formal/Why3Translator.cpp b/libsolidity/formal/Why3Translator.cpp index 64aa9b4c..f3831b40 100644 --- a/libsolidity/formal/Why3Translator.cpp +++ b/libsolidity/formal/Why3Translator.cpp @@ -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, ""); -- cgit v1.2.3