aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2018-07-25 17:31:57 +0800
committerGitHub <noreply@github.com>2018-07-25 17:31:57 +0800
commitff8e930054eaa3c7ae5f0b8160fcba15efbe264a (patch)
tree391e246bac959c9a74ce1c1b7f03042f9bbe41c2
parentae0959ae125ac2ae7084041a87c0736a8e7df6c6 (diff)
parenta5a61a0b7762bf5acdd01a4e6943d927b08f92ab (diff)
downloaddexon-solidity-ff8e930054eaa3c7ae5f0b8160fcba15efbe264a.tar.gz
dexon-solidity-ff8e930054eaa3c7ae5f0b8160fcba15efbe264a.tar.zst
dexon-solidity-ff8e930054eaa3c7ae5f0b8160fcba15efbe264a.zip
Merge pull request #4570 from ethereum/cleanup-catch-statements
More consistent catch statements
-rw-r--r--libsolidity/formal/CVC4Interface.cpp2
-rw-r--r--libsolidity/interface/StandardCompiler.cpp4
-rw-r--r--test/tools/isoltest.cpp2
3 files changed, 4 insertions, 4 deletions
diff --git a/libsolidity/formal/CVC4Interface.cpp b/libsolidity/formal/CVC4Interface.cpp
index dba5823a..c6f2771d 100644
--- a/libsolidity/formal/CVC4Interface.cpp
+++ b/libsolidity/formal/CVC4Interface.cpp
@@ -115,7 +115,7 @@ pair<CheckResult, vector<string>> CVC4Interface::check(vector<Expression> const&
values.push_back(toString(m_solver.getValue(toCVC4Expr(e))));
}
}
- catch (CVC4::Exception & e)
+ catch (CVC4::Exception const&)
{
result = CheckResult::ERROR;
values.clear();
diff --git a/libsolidity/interface/StandardCompiler.cpp b/libsolidity/interface/StandardCompiler.cpp
index c8d43e9f..8339780f 100644
--- a/libsolidity/interface/StandardCompiler.cpp
+++ b/libsolidity/interface/StandardCompiler.cpp
@@ -600,7 +600,7 @@ string StandardCompiler::compile(string const& _input)
if (!jsonParseStrict(_input, input, &errors))
return jsonCompactPrint(formatFatalError("JSONError", errors));
}
- catch(...)
+ catch (...)
{
return "{\"errors\":\"[{\"type\":\"JSONError\",\"component\":\"general\",\"severity\":\"error\",\"message\":\"Error parsing input JSON.\"}]}";
}
@@ -613,7 +613,7 @@ string StandardCompiler::compile(string const& _input)
{
return jsonCompactPrint(output);
}
- catch(...)
+ catch (...)
{
return "{\"errors\":\"[{\"type\":\"JSONError\",\"component\":\"general\",\"severity\":\"error\",\"message\":\"Error writing output JSON.\"}]}";
}
diff --git a/test/tools/isoltest.cpp b/test/tools/isoltest.cpp
index ed4f148e..bd4b0db9 100644
--- a/test/tools/isoltest.cpp
+++ b/test/tools/isoltest.cpp
@@ -119,7 +119,7 @@ TestTool::Result TestTool::process()
"Exception during syntax test: " << _e.what() << endl;
return Result::Exception;
}
- catch(...)
+ catch (...)
{
FormattedScope(cout, m_formatted, {BOLD, RED}) <<
"Unknown exception during syntax test." << endl;