Skip to content

Document JSON I/O error classes#3068

Merged
axic merged 1 commit intoargotorg:developfrom
izgzhen:document-io-class
Dec 12, 2017
Merged

Document JSON I/O error classes#3068
axic merged 1 commit intoargotorg:developfrom
izgzhen:document-io-class

Conversation

@izgzhen
Copy link
Contributor

@izgzhen izgzhen commented Oct 11, 2017

Issue #2186

@izgzhen
Copy link
Contributor Author

izgzhen commented Oct 11, 2017

@axic Still WIP, but you may comment the first few examples at any time

@axic
Copy link
Contributor

axic commented Oct 12, 2017

That seems to be a good location for it. You could add a comment in the output example next to errorType to "see below for complete list of types".

@izgzhen
Copy link
Contributor Author

izgzhen commented Oct 20, 2017

Finally grabbed sometime to finish the rest error names that I can find :)

3. ``InternalCompilerError``: internal compiler error, e.g. compilation failed, JSON logic error, JSON runtime error etc.
4. ``Exception``: Unknown exception during compilation
5. ``UnimplementedFeatureError``: some feature is not implemented
6. ``Exception``: Exception during compilation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is there twice


1. ``JSONError``: JSON input doesn't conform to the required format, e.g. input is not a JSON object, the language is not supported etc.
2. ``IOError``: Input/Output errors, e.g. invalid URLs
3. ``InternalCompilerError``: internal compiler error, e.g. compilation failed, JSON logic error, JSON runtime error etc.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JSON errors are not reported as part of this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the information comes from code:

./libsolidity/interface/StandardCompiler.cpp:457:		return formatFatalError("InternalCompilerError", string("JSON logic exception: ") + _exception.what());
./libsolidity/interface/StandardCompiler.cpp:461:		return formatFatalError("InternalCompilerError", string("JSON runtime exception: ") + _exception.what());

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah ok, those messages are a bit misleading. It still means that the compiler code is broken, not that the supplied data is broken.

All it should say is something like "internal bug in the compiler (should be reported as an issue)".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, thanks a lot

@axic
Copy link
Contributor

axic commented Oct 24, 2017

These are missing:

  • DeclarationError
  • DocstringParsingError
  • ParserError
  • SyntaxError
  • TypeError

Copy link
Contributor

@pirapira pirapira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix

/home/travis/build/ethereum/solidity/docs/using-the-compiler.rst:290: WARNING: Enumerated list ends without a blank line; unexpected unindent.

in the Travis build.

@izgzhen
Copy link
Contributor Author

izgzhen commented Dec 9, 2017

updated, thanks!

@axic
Copy link
Contributor

axic commented Dec 12, 2017

Added warnings and updated the descriptions.

@axic
Copy link
Contributor

axic commented Dec 12, 2017

The test failure was only a truffle issue. Merging this as the documentation test passed.

@axic axic merged commit 55a681d into argotorg:develop Dec 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants