How to remove {"contracts":{},.....} section when an error occur.
- Dominant language
- No language data
- Stars
- 319
- Forks
- 110
- PR merge metrics
- No merged PRs in 30d
Description
* Populus Version: populus==1.5.0b1
When I run: `py.test --capture=fd tests/test_greeter.py -s --disable-pytest-warnings`
It prints out:
```
E SolcError: contracts/eBlocBroker.sol:55:2: : Undeclared identifier.
E alper = 100;
E ^---^
E
E > command: `solc --standard-json`
E > return code: `0`
E > stderr:
E {"contracts":{},"errors":[{"component":"general","formattedMessage":"contracts/eBlocBroker.sol:55:2: : Undeclared identifier.\n\talper = 100;\n\t^---^\n","message":"Undeclared identifier.","severity":"error","type":"DeclarationError"}],"sources":{"contracts/ReceiptLib.sol":{"id":0,"legacyAST":{"children":[{"attributes":{"literals":["solidity","^","0.4",".7"]},"id":1,"name":"PragmaDirective","src":"0:23:0"},{"attributes":{"fullyImplemented":true,"isLibrary":true,"linearizedBaseContracts":[276],"name":"ReceiptLib"},"children":[{"attributes":{"name":"Interval"},"children":[{"attributes":{"constant":false,"name":"num","storageLocation":"default","type":"uint256","visibility":"internal"},"children":[{"attributes":{"name":"uint"},"id":2,"name":"ElementaryTypeName","src":"69:4:0"}],"id":3,"name":"VariableDeclaration","src":"69:8:0"},{"attributes":{"constant":false,"name":"core","storageLocation":"default","type":"int32","visibility":"internal"},"children":[{"attributes":{"name":"int32"},"id":4,"name":"ElementaryTypeName","src":"80:5:0"}],"id":5,"name":"VariableDeclaration","src":"80:11:0"},{"attributes":{"constant":false,"name":"next","storageLocation":"default","type":"uint32","visibility":"internal"},"children":[{"attributes":{"name":"uint32"},"id":6,"name":"ElementaryTypeName","src":"95:6:0"}],"id":7,"name":"VariableDeclaration","src":"95:11:0"}],"id":8,"name":"StructDefinition","src":"50:108:0"},{"attributes":{"name":"intervalNode"},"children":[{"attributes":{"constant":false,"name":"list","storageLocation":"default","type":"struct ReceiptLib.Interval storage ref[] storage pointer","visibility":"internal"},"children":[{"children":[{"attributes":{"name":"Interval"},"id":9,"name":"UserDefinedTypeName","src":"187:8:0"}],"id":10,"name":"ArrayTypeName","src":"187:10:0"}],"id":11,"name":"VariableDeclaration","src":"187:15:0"},{"attributes":{"constant":false,"name":"head","storageLocation":"default","type":"uint32","visibility":"internal"},"children":[{"attributes":{"name":"uint32"},"id":12,"name":"ElementaryTypeName","src":"205:6:0"}],"id":13,"name":"VariableDeclaration","src":"205:11:0"},{"attributes":{"constant":false,"name":"coreLimit","storageLocation":"default","type":"uint32","visibility":"internal"},"children":[{"attributes":{"name":"uint32"},"id":14,"name":"ElementaryTypeName","src":"219:6:0"}],"id":15,"name":"VariableDeclaration","src":"219:16:0"}],"id":16,"name":"StructDefinition","src":"164:78:0"},{"attributes":{"constant":false,"name":"construct","payable":false,"visibility":"public"},"children":[{"children":[{"attributes":{"constant":false,"name":"self","storageLocation":"storage","type":"struct ReceiptLib.intervalNode storage pointer","visibility":"internal"},"children":[{"attributes":{"name":"intervalNode"},"id":17,"name":"UserDefinedTypeName","src":"267:12:0"}],"id":18,"name":"VariableDeclaration","src":"267:25:0"},{"attributes":{"constant":false,"name":"coreLimit","storageLocation":"default","type":"uint32","visibility":"internal"},"children":[{"attributes":{"name":"uint32"},"id":19,"name":"ElementaryTypeName","src":"294:6:0"}],"id":20,"name":"VariableDeclaration","src":"294:16:0"}],"id":21,"name":"ParameterList","src":"266:45:0"},{"children":[],"id":22,"name":"ParameterList","src":"311:0:0"},{"children":[{"children":[{"attributes":{"type":"Unknown","type_conversion":false},"children":[{"attributes":{"member_name":"push","type":"Unknown"},"children":[{"attributes":{"member_name":"list","type":"Unknown"},"children":[{"attributes":{"type":"Unknown","value":"self"},"id":23,"name":"Identifier","src":"315:4:0"}],"id":26,"name":"MemberAccess","src":"315:9:0"}],"id":27,"name":"MemberAccess","src":"315:14:0"},{"attributes":{"type":"Unknown","type_conversion":false},"children":[{"attributes":{"type":"Unknown","value":"Interval"},"id":28,"name":"Identifier","src":"330:8:0"},{"attributes":{"hexvalue":"30","subdenomination":null,"token":null,"type":"Unknown","value":"0"},"id":29,"name":"Literal","src":"347:1:0"},{"attributes":{"hexvalue":"30","subdenomination":null,"token":null,"type":"Unknown","value":"0"},"id":30,"name":"Literal","src":"356:1:0"},{"attributes":{"hexvalue":"30","subdenomination":null,"token":null,"type":"Unknown","value":"0"},"id":31,"name":"Literal","src":"365:1:0"}],"id":32,"name":"FunctionCall","src":"330:39:0"}],"id":33,"name":"FunctionCall","src":"315:56:0"}],"id":34,"name":"ExpressionStatement","src":"315:56:0"},{"children":[{"attributes":{"type":"Unknown","type_conversion":false},"children":[{"attributes":{"member_name":"push","type":"Unknown"},"children":[{"attributes":{"member_name":"list","type":"Unknown"},"children":[{"attributes":{"type":"Unknown","value":"self"},"id":35,"name":"Identifier","src":"387:4:0"}],"id":38,"name":"MemberAccess","src":"387:9:0"}],"id":39,"name":"MemberAccess","src":"387:14:0"},{"attributes":{"type":"Unknown","type_conversion":false},"children":[{"attributes":{"type":"Unknown","value":"Interval"},"id":40,"name":"Identifier","src":"402:8:0"},{"attributes":{"hexvalue":"30","subdenomination":null,"token":null,"type":"Unknown","value":"0"},"id":41,"name":"Literal","src":"419:1:0"},{"attributes":{"hexvalue":"30","subdenomination":null,"token":null,"type":"Unknown","value":"0"},"id":42,"name":"Literal","src":"428:1:0"},{"attributes":{"hexvalue":"30","subdenomination":null,"token":null,"type":"Unknown","value":"0"},"id":43,"name":"Literal","src":"437:1:0"}],"id":44,"name":"FunctionCall","src":"402:39:0"}],"id":45,"name":"FunctionCall","src":"387:56:0"}],"id":46,"name":"ExpressionStatement","src":"387:56:0"},{"children":[{"attributes":{"operator":"=","type":"Unknown"},"children":[{"attributes":{"member_name":"head","type":"Unknown"},"children":[{"attributes":{"type":"Unknown","value":"self"},"id":47,"name":"Identifier","src":"459:4:0"}],"id":49,"name":"MemberAccess","src":"459:9:0"},{"attributes":{"hexvalue":"31","subdenomination":null,"token":null,"type":"Unknown","value":"1"},"id":50,"name":"Literal","src":"476:1:0"}],"id":51,"name":"Assignment","src":"459:18:0"}],"id":52,"name":"ExpressionStatement","src":"459:18:0"},{"children":[{"attributes":{"operator":"=","type":"Unknown"},"children":[{"attributes":{"member_name":"coreLimit","type":"Unknown"},"children":[{"attributes":{"type":"Unknown","value":"self"},"id":53,"name":"Identifier","src":"480:4:0"}],"id":55,"name":"MemberAccess","src":"480:14:0"},{"attributes":{"type":"Unknown","value":"coreLimit"},"id":56,"name":"Identifier","src":"497:9:0"}],"id":57,"name":"Assignment","src":"480:26:0"}],"id":58,"name":"ExpressionStatement","src":"480:26:0"}],"id":59,"name":"Block","src":"311:203:0"}],"id":60,"name":"FunctionDefinition","src":"248:266:0"},{"attributes":{"constant":false,"name":"receiptCheck","payable":false,"visibility":"public"},"children":[{"children":[{"attributes":{"constant":false,"name":"self","storageLocation":"storage","type":"struct ReceiptLib.intervalNode storage pointer","visibility":"internal"},"children":[{"attributes":{"name":"intervalNode"},"id":61,"name":"UserDefinedTypeName","src":"542:12:0"}],"id":62,"name":"VariableDeclaration","src":"542:25:0"},{"attributes":{"constant":false,"name":"s","storageLocation":"default","type":"uint256","visibility":"internal"},"children":[{"attributes":{"name":"uint"},"id":63,"name":"ElementaryTypeName","src":"569:4:0"}],"id":64,"name":"VariableDeclaration","src":"569:6:0"},{"attributes":{"constant":false,"name":"e","storageLocation":"default","type":"uint256","visibility":"internal"},"children":[{"attributes":{"name":"uint"},"id":65,"name":"ElementaryTypeName","src":"577:4:0"}],"id":66,"name":"VariableDeclaration","src":"577:6:0"},{"attributes":{"constant":false,"name":"c","storageLocation":"default","type":"int32","visibility":"internal"},"children":[{"attributes":{"name":"int32"},"id":67,"name":"ElementaryTypeName","src":"585:5:0"}],"id":68,"name":"VariableDeclaration","src":"585:7:0"}],"id":69,"name":"ParameterList","src":"541:52:0"},{"children":[{"attributes":{"constant":false,"name":"success","storageLocation":"default","type":"bool","visibility":"internal"},"children":[{"attributes":{"name":"bool"},"id":70,"name":"ElementaryTypeName","src":"602:4:0"}],"id":71,"name":"VariableDeclaration","src":"602:12:0"}],"id":72,"name":"ParameterList","src":"601:14:0"},{"children":[{"children":[{"attributes":{"constant":false,"name":"addr","storageLocation":"default","type":"uint32","visibility":"internal"},"children":[{"attributes":{"name":"uint32"},"id":73,"name":"ElementaryTypeName","src":"647:6:0"}],"id":74,"name":"VariableDeclaration","src":"647:13:0"},{"attributes":{"member_name":"head","type":"Unknown"},"children":[{"attributes":{"type":"Unknown","value":"self"},"id":75,"name":"Identifier","src":"669:4:0"}],"id":76,"name":"MemberAccess","src":"669:9:0"}],"id":77,"name":"VariableDeclarationStatement","src":"647:31:0"},{"children":[{"attributes":{"constant":false,"name":"flag","storageLocation":"default","type":"bytes1","visibility":"internal"},"children":[{"attributes":{"name":"byte"},"id":78,"name":"ElementaryTypeName","src":"681:4:0"}],"id":79,"name":"VariableDeclaration","src":"681:13:0"},{"attributes":{"hexvalue":"30","subdenomination":null,"token":null,"type":"Unknown","value":"0"},"id":80,"name":"Literal","src":"703:3:0"}],"id":81,"name":"VariableDeclarationStatement","src":"681:25:0"},{"children":[{"attributes":{"constant":false,"name":"carriedSum","storageLocation":"default","type":"int32","visibility":"internal"},"children":[{"attributes":{"name":"int32"},"id":82,"name":"ElementaryTypeName","src":"710:5:0"}],"id":83,"name":"VariableDeclaration","src":"710:19:0"}],"id":84,"name":"VariableDeclarationStatement","src":"710:20:0"},{"children":[{"attributes":{"constant":false,"name":"prevNode","storageLocation":"default","type":"struct ReceiptLib.Interval storage pointer","visibility":"internal"},"children":[{"attributes":{"name":"Interval"},"id":85,"name":"UserDefinedTypeName","src":"732:8:0"}],"id":86,"name":"VariableDeclaration","src":"732:17:0"}],"id":87,"name":"VariableDeclarationStatement","src":"732:18:0"},{"children":[{"attributes":{"constant":false,"name":"currentNode","storageLocation":"default","type":"struct ReceiptLib.Interval storage pointer","visibility":"inte
```
When I have a large contract `{"contracts":{}, .... }` consumes big space on my console. It basically dumps all contracts' code.
**Example:**

**[Q]** It is possible to remove `{"contracts":{},...}` section when an error occur inside my contract?
Thank you for your valuable time and help.

Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.