pyroom needs consistent error handling

Bug #242099 reported by Florian Heinle
2
Affects Status Importance Assigned to Milestone
PyRoom
Fix Released
Undecided
Florian Heinle

Bug Description

at the moment, error handling in pyroom is a little weird. Some errors are plainly ignored (when saving fails) (!!), some errors raise uncaught exceptions, some exceptions are raised and caught immediately and general `except:` clauses are often to be seen.

PyroomError exceptions go to a status bar that fades out after some time. While this fits into the "no distractions" paradigm nicely, I think error messages should either require the user's attention directly (via some dialog) or not at all.

We need some consistent and easy way to display error messages if we want to enable plugin support at any time

Related branches

Revision history for this message
Florian Heinle (tiax) wrote :

I propose we just raise PyroomError whenever something requires the user's immediate attention and catch it globally, displaying some dialog window with the error message.

description: updated
Revision history for this message
Florian Heinle (tiax) wrote :

implemention almost done

Changed in pyroom:
status: New → In Progress
assignee: nobody → tiax
Florian Heinle (tiax)
Changed in pyroom:
status: In Progress → Fix Released
Revision history for this message
Adam Rooke (abelianr) wrote : Re: [Bug 242099] Re: pyroom needs consistent error handling

I'm all for putting this in trunk, but will have to wait a bit to see if
anyone else has an opinion.

Cheers for the good work tiax, I merged your style branch last night if
you hadn't noticed.

Revision history for this message
Florian Heinle (tiax) wrote :

I figured that if anyone had opinions on that subject, they would have voiced them already, especially if they were totally against it. I had bug+blueprint+detailed specs on the wiki open for 7 days

I think further changes in details should be subject to new bug reports now

Revision history for this message
Adam Rooke (abelianr) wrote :

Few comments about how the errors are being handled:
I think its a bit of a pain that closing pyroom with ctrl-C in terminal brings up an errror, would there be some way of having:
if close_error:
    dont print error message
I also think it would be good if the error message could be echoed to terminal as well so that I can keep the error message for a while if I want, rather than keeping pyroom running just to keep the error.

Revision history for this message
Florian Heinle (tiax) wrote :

Oh, right. Ctrl+C. I forgot about that one. For consistency, I filed a bug (#246918). It's fixed now.

The error dialog for uncaught expressions comes with a textarea widget for easy copy+paste of tracebacks. Is that what you're looking for? Also, maybe look into pdb, the python debugger.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.