Need better error handling in the parser

Bug #1593390 reported by Joe Talbott on 2016-06-16
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snapcraft
Low
Joe Talbott

Bug Description

1. Don't use .get() to access wiki entry data.
2. Raise exceptions to the top of the stack and log warnings.

[Impact]

 * The parts origin will often change, and some changes might cause errors.

 * Better error messages will make it easier to fix the problems in the source.

[Test Case]

 * Add an invalid wiki entry.
 * Run snapcraft-parser
 * Make sure that an error is printed, but that it's not fatal and the rest of the entries are properly parsed.

[Regression Potential]

 * snapcraft-parse is relatively new. Some other use cases could be affected, so extensive exploratory is required here.

Joe Talbott (joetalbott) on 2016-06-16
Changed in snapcraft:
status: New → Confirmed
assignee: nobody → Joe Talbott (joetalbott)
Changed in snapcraft:
status: Confirmed → Fix Committed
milestone: none → 2.12
importance: Undecided → Low
Changed in snapcraft:
status: Fix Committed → Fix Released
no longer affects: Ubuntu Xenial
no longer affects: Ubuntu Yakkety
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers