Better exception handling with handle_exception
Bug #1298221 reported by
Ladislav Smola
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tuskar |
Opinion
|
Medium
|
Unassigned |
Bug Description
Wee need to get rid of all 'except Exception' blocks
e.g. https:/
The best way to do this is to come up with handle_exception abstraction, that will have list of all heat known exceptions. In this case it will return exception message to user, otherwise it will re-raise the unknown exception.
Changed in tuskar: | |
importance: | Undecided → High |
status: | New → Triaged |
Changed in tuskar: | |
assignee: | nobody → Dougal Matthews (d0ugal) |
Changed in tuskar: | |
status: | Triaged → Opinion |
To post a comment you must log in.
I spent a bit of time trying to come up with something nicer and I spoke with Jay about it briefly. I don't think we should change this.
The code shows the intention clearly and generates good errors by raising different exceptions. The main negative I can see is that it is quite verbose. We can't easily change the exception handling because the errors from heat are not specific enough to figure out what we should then re-raise it as.
So, I've bumped this down to medium priority as I'm not convinced it should be changed. It certainly isn't a high priority issue, the error handling works well in its current state.