aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/interface
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-03-21 19:18:00 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-04-21 02:38:00 +0800
commitf8cb0766d4da0c651999a9e6b9b158216b0a47cb (patch)
treecd18a522a1c90c4abf0ce32e18dc511e8c099ec6 /libsolidity/interface
parentce87984cc1d3b6f9e1784da831dbdf008853c2c6 (diff)
downloaddexon-solidity-f8cb0766d4da0c651999a9e6b9b158216b0a47cb.tar.gz
dexon-solidity-f8cb0766d4da0c651999a9e6b9b158216b0a47cb.tar.zst
dexon-solidity-f8cb0766d4da0c651999a9e6b9b158216b0a47cb.zip
Add formatFatalError() to StandardCompiler
Diffstat (limited to 'libsolidity/interface')
-rw-r--r--libsolidity/interface/StandardCompiler.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/libsolidity/interface/StandardCompiler.cpp b/libsolidity/interface/StandardCompiler.cpp
index 444ce02e..e5de39a8 100644
--- a/libsolidity/interface/StandardCompiler.cpp
+++ b/libsolidity/interface/StandardCompiler.cpp
@@ -29,6 +29,21 @@ using namespace std;
using namespace dev;
using namespace dev::solidity;
+Json::Value formatFatalError(string const& _type, string const& _description)
+{
+ Json::Value error = Json::objectValue;
+ error["type"] = _type;
+ error["component"] = "general";
+ error["severity"] = "error";
+ error["message"] = _description;
+
+ Json::Value output = Json::objectValue;
+ output["errors"] = Json::arrayValue;
+ output["errors"].append(error);
+
+ return output;
+}
+
Json::Value StandardCompiler::compileInternal(Json::Value const& _input)
{
m_compilerStack.reset(false);