mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
mainly style fixes/renaming
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user