diff options
author | Rhett Aultman <roadriverrail@gmail.com> | 2016-11-15 04:41:58 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2016-11-15 04:41:58 +0800 |
commit | 58e75c7a48f8166cca41e9017dad351113952ab5 (patch) | |
tree | ae7af869a4c5b1be6ee9272c01de855e0dbeb7c3 /solc | |
parent | 3f74c3c2369e59cb480cafdb31eeab6c18011504 (diff) | |
download | dexon-solidity-58e75c7a48f8166cca41e9017dad351113952ab5.tar.gz dexon-solidity-58e75c7a48f8166cca41e9017dad351113952ab5.tar.zst dexon-solidity-58e75c7a48f8166cca41e9017dad351113952ab5.zip |
Unimplemented features moved to their own exception (#1361)
Unimplemented features moved to their own exception
InternalCompilerError is an exception that really should be reserved for
actual internal errors of the compiler. Unimplemented features can now
use either solUnimplemented( ) or, if it should be conditional, then
solUnimplementedAssert( ).
* Revert some unimplemented exceptions, add handlers
The jsonCompiler and CommandLineInterface needed handlers for the
new UnimplementedFeatureException, and some cases I had moved on to
the new exception were better treated as real internal compiler
errors.
* Standardize on "Unimplemented feature" message
Diffstat (limited to 'solc')
-rw-r--r-- | solc/CommandLineInterface.cpp | 6 | ||||
-rw-r--r-- | solc/jsonCompiler.cpp | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/solc/CommandLineInterface.cpp b/solc/CommandLineInterface.cpp index 84cc2534..83168f86 100644 --- a/solc/CommandLineInterface.cpp +++ b/solc/CommandLineInterface.cpp @@ -604,6 +604,12 @@ bool CommandLineInterface::processInput() << boost::diagnostic_information(_exception); return false; } + catch (UnimplementedFeatureError const& _exception) + { + cerr << "Unimplemented feature:" << endl + << boost::diagnostic_information(_exception); + return false; + } catch (Error const& _error) { if (_error.type() == Error::Type::DocstringParsingError) diff --git a/solc/jsonCompiler.cpp b/solc/jsonCompiler.cpp index ef69105e..e5be8404 100644 --- a/solc/jsonCompiler.cpp +++ b/solc/jsonCompiler.cpp @@ -189,6 +189,10 @@ string compile(StringMap const& _sources, bool _optimize, CStyleReadFileCallback { errors.append(formatError(exception, "Internal compiler error", scannerFromSourceName)); } + catch (UnimplementedFeatureError const& exception) + { + errors.append(formatError(exception, "Unimplemented feature", scannerFromSourceName)); + } catch (Exception const& exception) { errors.append("Exception during compilation: " + boost::diagnostic_information(exception)); |