Opened 7 years ago

Closed 7 years ago

#1345 closed defect (fixed)

"Report a bug" should not be an option for errors that derive from NotABug

Reported by: Eric Pettersen Owned by: Eric Pettersen
Priority: moderate Milestone: 1.0
Component: Core Version:
Keywords: Cc: Tom Goddard
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

As summary. Pretty much the point of those error types (UserError, LimitationError, etc.)

Errors of this type caused from a typed command are already caught by the command line (well, UserError at least) and don't generate a dialog at all. Errors from other sources are the problem.

Attachments (1)

err.py (80 bytes ) - added by Eric Pettersen 7 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 by Tom Goddard, 7 years ago

I never saw a UserError or LimitationError that showed an error dialog. Can you give an example where that occurs?

The error dialog is handled by the log bundle and is shown when an error is logged. The log has no idea what kind of exception was raised, only the code which logged the error knows that. So if we need the error dialog to show or hide the bug report button then the logger interface will need to be able to convey that additional information.

by Eric Pettersen, 7 years ago

Attachment: err.py added

comment:2 by Eric Pettersen, 7 years ago

Here's two ways to do it. Open the attached file and UserError is raised and results in a dialog with Report Bug. The second way is to drag out a toolbar so that it is floating, then right click on it to get a context menu and choose "Save tool position". This raises Limitation Error and also produces a Report Bug dialog. You need a quasi-recent checkout for the latter behavior.

comment:3 by Tom Goddard, 7 years ago

Cc: Tom Goddard added
Owner: changed from Tom Goddard to Eric Pettersen

Ok. I'm interested in real cases that produce undesired report-a-bug buttons. I'm wondering if it ever really happens that you want to raise an error dialog when it isn't an error. Maybe. But then maybe Logger should have another category besides error, warning, info, that instead indicates this is and important message that is not a reportable error.

Reassigning to Eric to evaluate how and whether the Logger API should change to support non-reportable errors.

comment:4 by Eric Pettersen, 7 years ago

Resolution: fixed
Status: assignedclosed

Made an additional log level: LEVEL_BUG. Only this level puts the 'Report Bug' button on the dialog.

Note: See TracTickets for help on using tickets.