MCPcopy Create free account
hub / github.com/argotorg/solidity / reportCodeGenerationError

Method reportCodeGenerationError

libsolidity/interface/CompilerStack.cpp:2122–2137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2120}
2121
2122void CompilerStack::reportCodeGenerationError(Error const& _error, ContractDefinition const* _contractDefinition)
2123{
2124 solAssert(_error.type() == Error::Type::CodeGenerationError);
2125 solAssert(_error.comment(), "Errors must include a message for the user.");
2126 if (_error.sourceLocation() && _error.sourceLocation()->sourceName)
2127 solAssert(m_sources.count(*_error.sourceLocation()->sourceName) != 0);
2128 solAssert(_contractDefinition);
2129
2130 m_errorReporter.codeGenerationError(
2131 _error.errorId(),
2132 (_error.sourceLocation() && _error.sourceLocation()->sourceName) ?
2133 *_error.sourceLocation() :
2134 _contractDefinition->location(),
2135 *_error.comment()
2136 );
2137}
2138
2139void CompilerStack::reportIRPostAnalysisError(Error const* _error, ContractDefinition const* _contractDefinition)
2140{

Callers

nothing calls this directly

Calls 7

commentMethod · 0.80
codeGenerationErrorMethod · 0.80
errorIdMethod · 0.80
typeMethod · 0.45
sourceLocationMethod · 0.45
countMethod · 0.45
locationMethod · 0.45

Tested by

no test coverage detected