Opened 12 years ago

Closed 10 years ago

Last modified 10 years ago

#10696 closed Bug (duplicate) throws away exception information

Reported by: Leo Shklovskii Owned by: nobody
Component: Core (Other) Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Design decision needed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


When an ImportError occurs in, the exception is caught and stored in a variable - e, but that data isn't used in the error message at all.

Because is a python file, there could be a variety of issues that come up and its useful to see what the actual underlying error is. In my usecase, I have the line

from settings_local import *

at the end of the main file. If doesn't exist, then an import error gets thrown but the exception handling in swallows it. It would be great to add something like:

sys.stderr.write(e.message + '\n')

to to surface the actual error that's occurring.

Change History (7)

comment:1 Changed 12 years ago by thatch

milestone: 1.1
Triage Stage: UnreviewedDesign decision needed

comment:2 Changed 12 years ago by Jacob

Triage Stage: Design decision neededAccepted

comment:3 Changed 12 years ago by Jacob

milestone: 1.1

comment:4 Changed 12 years ago by Jacob

Triage Stage: AcceptedDesign decision needed

comment:5 Changed 10 years ago by Seth Buntin

Severity: Normal
Type: Bug

comment:6 Changed 10 years ago by Graham King

Easy pickings: unset
Resolution: duplicate
Status: newclosed

Looks like a duplicate of #14130. Please re-open if I'm mistaken.

Either way, the problem is gone. I've tried every which way I can think to cause an error in (import errors, regular errors, file permission errors deep within the logging module, etc) and it always gets reported correctly to the console.

comment:7 Changed 10 years ago by Leo Shklovskii

Thanks Graham. It is a dup and it's all fixed.

Note: See TracTickets for help on using tickets.
Back to Top