aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/formal
diff options
context:
space:
mode:
authorYoichi Hirai <i@yoichihirai.com>2016-09-08 15:47:01 +0800
committerYoichi Hirai <i@yoichihirai.com>2016-09-10 02:15:13 +0800
commit4337e70cca58c02de15af258a0efc29062aa0a36 (patch)
tree4cb0333ed225792929875ab00c935cf71b202ee7 /libsolidity/formal
parentac7c6ae7d240516b0c530d51645742320634430d (diff)
downloaddexon-solidity-4337e70cca58c02de15af258a0efc29062aa0a36.tar.gz
dexon-solidity-4337e70cca58c02de15af258a0efc29062aa0a36.tar.zst
dexon-solidity-4337e70cca58c02de15af258a0efc29062aa0a36.zip
Prepare for leaky exceptions
Now toFormalType() reports errors by exceptions, they will be sometimes leaked to the wider context. This commits adds a catch.
Diffstat (limited to 'libsolidity/formal')
-rw-r--r--libsolidity/formal/Why3Translator.cpp4
1 files changed, 4 insertions, 0 deletions
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, "");