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

Function formatError

libsolidity/interface/StandardCompiler.cpp:61–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59{
60
61Json formatError(
62 Error::Type _type,
63 std::string const& _component,
64 std::string const& _message,
65 std::string const& _formattedMessage = "",
66 Json const& _sourceLocation = Json(),
67 Json const& _secondarySourceLocation = Json()
68)
69{
70 Json error;
71 error["type"] = Error::formatErrorType(_type);
72 error["component"] = _component;
73 error["severity"] = Error::formatErrorSeverityLowercase(Error::errorSeverity(_type));
74 error["message"] = _message;
75 error["formattedMessage"] = (_formattedMessage.length() > 0) ? _formattedMessage : _message;
76 if (_sourceLocation.is_object())
77 error["sourceLocation"] = _sourceLocation;
78 if (_secondarySourceLocation.is_array())
79 error["secondarySourceLocations"] = _secondarySourceLocation;
80 return error;
81}
82
83Json formatFatalError(Error::Type _type, std::string const& _message)
84{

Callers 10

parseAssemblyMethod · 0.85
parseNestingLevelMethod · 0.85
expectArgumentMethod · 0.85
expectNoMoreArgumentsMethod · 0.85
formatFatalErrorFunction · 0.85
formatErrorWithExceptionFunction · 0.85
parseInputMethod · 0.85
importEVMAssemblyMethod · 0.85
compileSolidityMethod · 0.85
compileYulMethod · 0.85

Calls 1

lengthMethod · 0.45

Tested by

no test coverage detected