From 742e5b259a8c88e69f09ede7312673157cd77a1f Mon Sep 17 00:00:00 2001 From: LianaHus Date: Fri, 2 Oct 2015 14:41:40 +0200 Subject: added Error class for all kind of errors Conflicts: libsolidity/Exceptions.h --- solc/jsonCompiler.cpp | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'solc/jsonCompiler.cpp') diff --git a/solc/jsonCompiler.cpp b/solc/jsonCompiler.cpp index 00fd0370..1cf539e5 100644 --- a/solc/jsonCompiler.cpp +++ b/solc/jsonCompiler.cpp @@ -134,17 +134,9 @@ string compile(string _input, bool _optimize) )); success = succ; // keep success false on exception } - catch (ParserError const& exception) + catch (Error const& error) { - errors.append(formatError(exception, "Parser error", compiler)); - } - catch (DeclarationError const& exception) - { - errors.append(formatError(exception, "Declaration error", compiler)); - } - catch (TypeError const& exception) - { - errors.append(formatError(exception, "Type error", compiler)); + errors.append(formatError(error, error.typeName(), compiler)); } catch (CompilerError const& exception) { @@ -154,10 +146,6 @@ string compile(string _input, bool _optimize) { errors.append(formatError(exception, "Internal compiler error", compiler)); } - catch (DocstringParsingError const& exception) - { - errors.append(formatError(exception, "Documentation parsing error", compiler)); - } catch (Exception const& exception) { errors.append("Exception during compilation: " + boost::diagnostic_information(exception)); -- cgit