Florian Apolloner <[email protected]> writes: > On Thursday, August 22, 2013 6:43:39 AM UTC+2, Ben Finney wrote: > > > > This could be done by having Django's database interface catch the > > error, and chain a new exception from that one: > > Knowing the model alone is imo pretty useless since that's in the > traceback anyways
I didn't see a traceback. The OP gave only the error message. How do you know they are getting the model name? > also what you suggest has to happen way up higher the chain; otherwise > model wouldn't be known… Exactly. Catch the low-level error from the database engine at a point where the model is known. Then chain a new, more-informative exception, which will say what the fully-qualified model name is, along with the full exception information of the original exception. -- \ “Once consumers can no longer get free music, they will have to | `\ buy the music in the formats we choose to put out.” —Steve | _o__) Heckler, VP of Sony Music, 2001 | Ben Finney -- You received this message because you are subscribed to the Google Groups "Django developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-developers. For more options, visit https://groups.google.com/groups/opt_out.
