aboutsummaryrefslogtreecommitdiffstats
path: root/solc
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-04-10 20:05:50 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-04-10 21:07:37 +0800
commita182dfe26695b24704047265cbe1cac80d0f8a83 (patch)
treeabc3d52acc79df2716d1cc03a734a2c81b563693 /solc
parentb1db6eac8b298967b73e3f09c75f12f566b3074c (diff)
downloaddexon-solidity-a182dfe26695b24704047265cbe1cac80d0f8a83.tar
dexon-solidity-a182dfe26695b24704047265cbe1cac80d0f8a83.tar.gz
dexon-solidity-a182dfe26695b24704047265cbe1cac80d0f8a83.tar.bz2
dexon-solidity-a182dfe26695b24704047265cbe1cac80d0f8a83.tar.lz
dexon-solidity-a182dfe26695b24704047265cbe1cac80d0f8a83.tar.xz
dexon-solidity-a182dfe26695b24704047265cbe1cac80d0f8a83.tar.zst
dexon-solidity-a182dfe26695b24704047265cbe1cac80d0f8a83.zip
Remove empty wrapper formatError from jsonCompiler
Diffstat (limited to 'solc')
-rw-r--r--solc/jsonCompiler.cpp21
1 files changed, 6 insertions, 15 deletions
diff --git a/solc/jsonCompiler.cpp b/solc/jsonCompiler.cpp
index f55d0c8d..0bf890af 100644
--- a/solc/jsonCompiler.cpp
+++ b/solc/jsonCompiler.cpp
@@ -50,15 +50,6 @@ extern "C" {
typedef void (*CStyleReadFileCallback)(char const* _path, char** o_contents, char** o_error);
}
-string formatError(
- Exception const& _exception,
- string const& _name,
- function<Scanner const&(string const&)> const& _scannerFromSourceName
-)
-{
- return SourceReferenceFormatter::formatExceptionInformation(_exception, _name, _scannerFromSourceName);
-}
-
Json::Value functionHashes(ContractDefinition const& _contract)
{
Json::Value functionHashes(Json::objectValue);
@@ -168,7 +159,7 @@ string compile(StringMap const& _sources, bool _optimize, CStyleReadFileCallback
for (auto const& error: compiler.errors())
{
auto err = dynamic_pointer_cast<Error const>(error);
- errors.append(formatError(
+ errors.append(SourceReferenceFormatter::formatExceptionInformation(
*error,
(err->type() == Error::Type::Warning) ? "Warning" : "Error",
scannerFromSourceName
@@ -178,19 +169,19 @@ string compile(StringMap const& _sources, bool _optimize, CStyleReadFileCallback
}
catch (Error const& error)
{
- errors.append(formatError(error, error.typeName(), scannerFromSourceName));
+ errors.append(SourceReferenceFormatter::formatExceptionInformation(error, error.typeName(), scannerFromSourceName));
}
catch (CompilerError const& exception)
{
- errors.append(formatError(exception, "Compiler error (" + exception.lineInfo() + ")", scannerFromSourceName));
+ errors.append(SourceReferenceFormatter::formatExceptionInformation(exception, "Compiler error (" + exception.lineInfo() + ")", scannerFromSourceName));
}
catch (InternalCompilerError const& exception)
{
- errors.append(formatError(exception, "Internal compiler error (" + exception.lineInfo() + ")", scannerFromSourceName));
+ errors.append(SourceReferenceFormatter::formatExceptionInformation(exception, "Internal compiler error (" + exception.lineInfo() + ")", scannerFromSourceName));
}
catch (UnimplementedFeatureError const& exception)
{
- errors.append(formatError(exception, "Unimplemented feature (" + exception.lineInfo() + ")", scannerFromSourceName));
+ errors.append(SourceReferenceFormatter::formatExceptionInformation(exception, "Unimplemented feature (" + exception.lineInfo() + ")", scannerFromSourceName));
}
catch (Exception const& exception)
{
@@ -243,7 +234,7 @@ string compile(StringMap const& _sources, bool _optimize, CStyleReadFileCallback
{
Json::Value errors(Json::arrayValue);
for (auto const& error: formalErrors)
- errors.append(formatError(
+ errors.append(SourceReferenceFormatter::formatExceptionInformation(
*error,
(error->type() == Error::Type::Warning) ? "Warning" : "Error",
scannerFromSourceName