mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
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
This commit is contained in:
committed by
Alex Beregszaszi
parent
3f74c3c236
commit
58e75c7a48
@@ -37,6 +37,7 @@ using ErrorList = std::vector<std::shared_ptr<Error const>>;
|
||||
struct CompilerError: virtual Exception {};
|
||||
struct InternalCompilerError: virtual Exception {};
|
||||
struct FatalError: virtual Exception {};
|
||||
struct UnimplementedFeatureError: virtual Exception{};
|
||||
|
||||
class Error: virtual public Exception
|
||||
{
|
||||
|
||||
@@ -30,6 +30,7 @@ namespace dev
|
||||
namespace solidity
|
||||
{
|
||||
struct InternalCompilerError;
|
||||
struct UnimplementedFeatureError;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,3 +38,8 @@ struct InternalCompilerError;
|
||||
#define solAssert(CONDITION, DESCRIPTION) \
|
||||
assertThrow(CONDITION, ::dev::solidity::InternalCompilerError, DESCRIPTION)
|
||||
|
||||
#define solUnimplementedAssert(CONDITION, DESCRIPTION) \
|
||||
assertThrow(CONDITION, ::dev::solidity::UnimplementedFeatureError, DESCRIPTION)
|
||||
|
||||
#define solUnimplemented(DESCRIPTION) \
|
||||
solUnimplementedAssert(false, DESCRIPTION)
|
||||
|
||||
Reference in New Issue
Block a user