aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2016-09-07 21:13:41 +0800
committerGitHub <noreply@github.com>2016-09-07 21:13:41 +0800
commitc641ca26ec7e416864d82d428e86fa1cccb6ed52 (patch)
tree88d53900f07fbbcae1e228e3b379e88df8a5854d
parent5e63e61a9063b3676f610ec80715f1e089807e10 (diff)
parent3f2027ee5f5aa6ed767f88ec5426e664a254dc8f (diff)
downloaddexon-solidity-c641ca26ec7e416864d82d428e86fa1cccb6ed52.tar.gz
dexon-solidity-c641ca26ec7e416864d82d428e86fa1cccb6ed52.tar.zst
dexon-solidity-c641ca26ec7e416864d82d428e86fa1cccb6ed52.zip
Merge pull request #1009 from pirapira/separate_exceptions
Separate the try/catch blocks on JSON and formal methods output generation
-rw-r--r--solc/jsonCompiler.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/solc/jsonCompiler.cpp b/solc/jsonCompiler.cpp
index 671b8c0f..ef69105e 100644
--- a/solc/jsonCompiler.cpp
+++ b/solc/jsonCompiler.cpp
@@ -223,7 +223,14 @@ string compile(StringMap const& _sources, bool _optimize, CStyleReadFileCallback
contractData["assembly"] = compiler.streamAssembly(unused, contractName, _sources, true);
output["contracts"][contractName] = contractData;
}
+ }
+ catch (...)
+ {
+ output["errors"].append("Unknown exception while generating contract data output.");
+ }
+ try
+ {
// Do not taint the internal error list
ErrorList formalErrors;
if (compiler.prepareFormalAnalysis(&formalErrors))
@@ -239,7 +246,14 @@ string compile(StringMap const& _sources, bool _optimize, CStyleReadFileCallback
));
output["formal"]["errors"] = errors;
}
+ }
+ catch (...)
+ {
+ output["errors"].append("Unknown exception while generating formal method output.");
+ }
+ try
+ {
// Indices into this array are used to abbreviate source names in source locations.
output["sourceList"] = Json::Value(Json::arrayValue);
for (auto const& source: compiler.sourceNames())
@@ -250,7 +264,7 @@ string compile(StringMap const& _sources, bool _optimize, CStyleReadFileCallback
}
catch (...)
{
- output["errors"].append("Unknown exception while generating compiler output.");
+ output["errors"].append("Unknown exception while generating source name output.");
}
}