Code

#18876 closed Cleanup/optimization (duplicate)

Use less error output

Reported by: patroqueeet Owned by: nobody
Component: Core (Management commands) Version: 1.4
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

after upgrading from 1.2.7 to 1.3.1 I ran into error messages like "cannot import name XY". I had to use the PDB lib and heavy debugging to find out why. It should print the error source.

I found out:
in /django/core/management/base.py:206-207

that

import traceback
sys.stderr.write("%s" % traceback.print_tb(sys.exc_info()[2]))

helped a lot to tell me about the errors source.

Attachments (0)

Change History (1)

comment:1 Changed 20 months ago by claudep

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to duplicate
  • Status changed from new to closed

You are right in that masking exceptions is a bad thing. We are trying to improve the situation (see for example #18845). However, we have already improved things in current code, notably with [694bc0f22bdb30a472de6fec05a44adf5c0f1f2c] and [f2b6763ad7cb281ca8699a9c3d532a82f965be4f]. If you find something that's still not good enough in current code, feel free to reopen with a real case.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.