diff options
author | LianaHus <liana@ethdev.com> | 2015-10-15 20:36:23 +0800 |
---|---|---|
committer | LianaHus <liana@ethdev.com> | 2015-10-15 20:36:23 +0800 |
commit | 771f20b595ec081c128e3b99ec3794eff11a58a5 (patch) | |
tree | 4d5226820f3158ac763c1289132151d46e6fd84a /libsolidity | |
parent | 0d0fd31fbf41ea7c2fe3923a645a012026f314d4 (diff) | |
download | dexon-solidity-771f20b595ec081c128e3b99ec3794eff11a58a5.tar.gz dexon-solidity-771f20b595ec081c128e3b99ec3794eff11a58a5.tar.zst dexon-solidity-771f20b595ec081c128e3b99ec3794eff11a58a5.zip |
mainly style fixes/renaming
Diffstat (limited to 'libsolidity')
-rw-r--r-- | libsolidity/Exceptions.cpp | 4 | ||||
-rw-r--r-- | libsolidity/Exceptions.h | 2 | ||||
-rw-r--r-- | libsolidity/NameAndTypeResolver.cpp | 12 | ||||
-rw-r--r-- | libsolidity/Parser.cpp | 4 | ||||
-rw-r--r-- | libsolidity/TypeChecker.cpp | 4 |
5 files changed, 13 insertions, 13 deletions
diff --git a/libsolidity/Exceptions.cpp b/libsolidity/Exceptions.cpp index 37d25697..96bb2e37 100644 --- a/libsolidity/Exceptions.cpp +++ b/libsolidity/Exceptions.cpp @@ -15,7 +15,7 @@ along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>. */ /** - * @author Christian <c@ethdev.com> + * @author Liana <liana@ethdev.com> * @date 2015 * Solidity exception hierarchy. */ @@ -26,7 +26,7 @@ using namespace dev; using namespace dev::solidity; -Error::Error(Error::Type _type): m_type(_type) +Error::Error(Type _type): m_type(_type) { switch(m_type) { diff --git a/libsolidity/Exceptions.h b/libsolidity/Exceptions.h index 9bc22994..59d69a27 100644 --- a/libsolidity/Exceptions.h +++ b/libsolidity/Exceptions.h @@ -36,7 +36,7 @@ using ErrorList = std::vector<std::shared_ptr<Error const>>; struct CompilerError: virtual Exception {}; struct InternalCompilerError: virtual Exception {}; -struct fatalError: virtual Exception {}; //todo rename to FatalError +struct FatalError: virtual Exception {}; class Error: virtual public Exception { diff --git a/libsolidity/NameAndTypeResolver.cpp b/libsolidity/NameAndTypeResolver.cpp index 934be0e3..dc82531f 100644 --- a/libsolidity/NameAndTypeResolver.cpp +++ b/libsolidity/NameAndTypeResolver.cpp @@ -49,7 +49,7 @@ bool NameAndTypeResolver::registerDeclarations(SourceUnit& _sourceUnit) { DeclarationRegistrationHelper registrar(m_scopes, _sourceUnit, m_errors); } - catch (fatalError) + catch (FatalError) { return false; } @@ -122,7 +122,7 @@ bool NameAndTypeResolver::resolveNamesAndTypes(ContractDefinition& _contract) ); } } - catch (fatalError const& _e) + catch (FatalError const& _e) { return false; } @@ -136,7 +136,7 @@ bool NameAndTypeResolver::updateDeclaration(Declaration const& _declaration) m_scopes[nullptr].registerDeclaration(_declaration, false, true); solAssert(_declaration.scope() == nullptr, "Updated declaration outside global scope."); } - catch(fatalError _error) + catch(FatalError _error) { return false; } @@ -317,7 +317,7 @@ void NameAndTypeResolver::reportFatalDeclarationError( ) { reportDeclarationError(_sourceLoction, _description); - BOOST_THROW_EXCEPTION(fatalError()); + BOOST_THROW_EXCEPTION(FatalError()); } void NameAndTypeResolver::reportTypeError(Error _e) @@ -328,7 +328,7 @@ void NameAndTypeResolver::reportTypeError(Error _e) void NameAndTypeResolver::reportFatalTypeError(Error _e) { reportTypeError(_e); - BOOST_THROW_EXCEPTION(fatalError()); + BOOST_THROW_EXCEPTION(FatalError()); } @@ -527,7 +527,7 @@ void DeclarationRegistrationHelper::fatalDeclarationError( ) { declarationError(_sourceLoction, _description); - BOOST_THROW_EXCEPTION(fatalError()); + BOOST_THROW_EXCEPTION(FatalError()); } } diff --git a/libsolidity/Parser.cpp b/libsolidity/Parser.cpp index 491af369..58632b85 100644 --- a/libsolidity/Parser.cpp +++ b/libsolidity/Parser.cpp @@ -87,7 +87,7 @@ ASTPointer<SourceUnit> Parser::parse(shared_ptr<Scanner> const& _scanner) } return nodeFactory.createNode<SourceUnit>(nodes); } - catch(fatalError const& _error) + catch(FatalError const& _error) { return nullptr; } @@ -1179,7 +1179,7 @@ void Parser::parserError(string const& _description) void Parser::fatalParserError(string const& _description) { parserError(_description); - BOOST_THROW_EXCEPTION(fatalError()); + BOOST_THROW_EXCEPTION(FatalError()); } } diff --git a/libsolidity/TypeChecker.cpp b/libsolidity/TypeChecker.cpp index 2e45f7b0..9ceb8203 100644 --- a/libsolidity/TypeChecker.cpp +++ b/libsolidity/TypeChecker.cpp @@ -36,7 +36,7 @@ bool TypeChecker::checkTypeRequirements(const ContractDefinition& _contract) { visit(_contract); } - catch (fatalError const&) + catch (FatalError const&) { // We got a fatal error which required to stop further type checking, but we can // continue normally from here. @@ -1268,5 +1268,5 @@ void TypeChecker::typeError(ASTNode const& _node, string const& _description) void TypeChecker::fatalTypeError(ASTNode const& _node, string const& _description) { typeError(_node, _description); - BOOST_THROW_EXCEPTION(fatalError()); + BOOST_THROW_EXCEPTION(FatalError()); } |