mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Update errors output
This commit is contained in:
parent
21a0228485
commit
627a2cec4d
@ -174,24 +174,27 @@ Output Description
|
|||||||
.. code-block:: none
|
.. code-block:: none
|
||||||
|
|
||||||
{
|
{
|
||||||
errors: ["error1", "error2"], // we might structure them
|
// Optional: not present if no errors/warnings were encountered
|
||||||
errors: [
|
errors: [
|
||||||
{
|
{
|
||||||
// (axic)
|
// Optional
|
||||||
file: "sourceFile.sol", // optional?
|
file: "sourceFile.sol",
|
||||||
contract: "contractName", // optional
|
// Optional
|
||||||
line: 100, // optional - currently, we always have a byte range in the source file
|
contract: "contractName",
|
||||||
// Errors/warnings originate in several components, most of them are not
|
// Optional
|
||||||
// backend-specific. Currently, why3 errors are part of the why3 output.
|
line: 100,
|
||||||
// I think it is better to put code-generator-specific errors into the code-generator output
|
// Optional
|
||||||
// area, and warnings and errors that are code-generator-agnostic into this general area,
|
column: 0,
|
||||||
// so that it is easier to determine whether some source code is invalid or only
|
// Mandatory: Error type, such as "TypeError", "InternalCompilerError", "Exception", etc
|
||||||
// triggers errors/warnings in some backend that might only implement some part of solidity.
|
type: "TypeError",
|
||||||
type: "evm" or "why3" or "ewasm" // maybe a better field name would be needed
|
// Mandatory: Component where the error originated, such as "general", "why3", "ewasm", etc.
|
||||||
severity: "warning" or "error" // mandatory
|
component: "general",
|
||||||
message: "Invalid keyword" // mandatory
|
// Mandatory ("error" or "warning")
|
||||||
|
severity: "error",
|
||||||
|
// Mandatory
|
||||||
|
message: "Invalid keyword"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
// This contains all the compiled outputs. It can be limited/filtered by the compilationTarget setting.
|
// This contains all the compiled outputs. It can be limited/filtered by the compilationTarget setting.
|
||||||
contracts: {
|
contracts: {
|
||||||
"sourceFile.sol:ContractName": {
|
"sourceFile.sol:ContractName": {
|
||||||
|
Loading…
Reference in New Issue
Block a user