Skip to content

Commit

Permalink
mainly style fixes/renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
LianaHus committed Oct 15, 2015
1 parent 0d0fd31 commit 771f20b
Show file tree
Hide file tree
Showing 7 changed files with 105 additions and 95 deletions.
4 changes: 2 additions & 2 deletions libsolidity/Exceptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand All @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion libsolidity/Exceptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
12 changes: 6 additions & 6 deletions libsolidity/NameAndTypeResolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ bool NameAndTypeResolver::registerDeclarations(SourceUnit& _sourceUnit)
{
DeclarationRegistrationHelper registrar(m_scopes, _sourceUnit, m_errors);
}
catch (fatalError)
catch (FatalError)
{
return false;
}
Expand Down Expand Up @@ -122,7 +122,7 @@ bool NameAndTypeResolver::resolveNamesAndTypes(ContractDefinition& _contract)
);
}
}
catch (fatalError const& _e)
catch (FatalError const& _e)
{
return false;
}
Expand All @@ -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;
}
Expand Down Expand Up @@ -317,7 +317,7 @@ void NameAndTypeResolver::reportFatalDeclarationError(
)
{
reportDeclarationError(_sourceLoction, _description);
BOOST_THROW_EXCEPTION(fatalError());
BOOST_THROW_EXCEPTION(FatalError());
}

void NameAndTypeResolver::reportTypeError(Error _e)
Expand All @@ -328,7 +328,7 @@ void NameAndTypeResolver::reportTypeError(Error _e)
void NameAndTypeResolver::reportFatalTypeError(Error _e)
{
reportTypeError(_e);
BOOST_THROW_EXCEPTION(fatalError());
BOOST_THROW_EXCEPTION(FatalError());
}


Expand Down Expand Up @@ -527,7 +527,7 @@ void DeclarationRegistrationHelper::fatalDeclarationError(
)
{
declarationError(_sourceLoction, _description);
BOOST_THROW_EXCEPTION(fatalError());
BOOST_THROW_EXCEPTION(FatalError());
}

}
Expand Down
4 changes: 2 additions & 2 deletions libsolidity/Parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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());
}

}
Expand Down
4 changes: 2 additions & 2 deletions libsolidity/TypeChecker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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());
}
Loading

0 comments on commit 771f20b

Please sign in to comment.