Merge lp:~joetalbott/utah/parser_error_handling into lp:utah
Proposed by
Joe Talbott
Status: | Merged |
---|---|
Approved by: | Javier Collado |
Approved revision: | 760 |
Merged at revision: | 763 |
Proposed branch: | lp:~joetalbott/utah/parser_error_handling |
Merge into: | lp:utah |
Diff against target: |
145 lines (+68/-18) 2 files modified
docs/source/reference.rst (+6/-0) utah/parser.py (+62/-18) |
To merge this branch: | bzr merge lp:~joetalbott/utah/parser_error_handling |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Javier Collado (community) | Approve | ||
Joe Talbott (community) | Needs Resubmitting | ||
Review via email: mp+135525@code.launchpad.net |
Commit message
Add module level error handling and raise ParserError when necessary.
Description of the change
This branch handles schema validation errors so that the parsing process can finish.
I'm not sure if I should add my own exception class to utah.parser and have consumers of this module use that exception as an indicator of failure or use None as I'm doing in this branch. Open for discussion.
To post a comment you must log in.
I'm not sure about the usefulness of capturing the exceptions and printing
errors without more detail about what would be the use case for it.
If the code is expected to be used as a script, then it makes sense to do this
and also to return an error code. However, if the code is expected to be used
as a library, then the calling code could capture the exceptions itself, so it
depends on the expectations of that code.