Re: Featurereuqest: Helpfull tracebacks

2013-08-23 Thread Aymeric Augustin
As soon as Django drops support for Python 2 :) -- Aymeric. Le 22 août 2013 à 06:43, Ben Finney a écrit : > > This could be done by having Django's database interface catch the > error, and chain a new exception from that one: -- You received this message because you are subscribed to the G

Re: Featurereuqest: Helpfull tracebacks

2013-08-23 Thread Florian Apolloner
On Friday, August 23, 2013 4:52:16 AM UTC+2, Ben Finney wrote: > > I didn't see a traceback. The OP gave only the error message. How do you > know they are getting the model name? > If he had shown his full traceback you'd see how django came to execute this query; when it reaches your code y

Re: Featurereuqest: Helpfull tracebacks

2013-08-22 Thread Ben Finney
Florian Apolloner 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 > trace

Re: Featurereuqest: Helpfull tracebacks

2013-08-21 Thread Florian Apolloner
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; also what you suggest

Re: Featurereuqest: Helpfull tracebacks

2013-08-21 Thread Ben Finney
Roland van Laar writes: > I would like to know which Model and Field caused the error. > > Such as: DatabaseError: own_app.models.User.street: value too long for > type character varying(100). This could be done by having Django's database interface catch the error, and chain a new exception fro

Re: Featurereuqest: Helpfull tracebacks

2013-08-21 Thread Michael Manfre
Any improvements would need to be backend specific due to differences in error messages between database servers (and potentially different versions of the same database server). It sounds like the identified problem is the potential for a mismatch between model definitions and the underlying data

Re: Featurereuqest: Helpfull tracebacks

2013-08-21 Thread Albert O'Connor
On Wed, Aug 21, 2013 at 7:55 AM, Florian Apolloner wrote: > > > On Wednesday, August 21, 2013 12:18:24 PM UTC+2, Anssi Kääriäinen wrote: >> >> Improvements to error messages are usually accepted. This idea, too, if >> there is a way to actually do it without ugly hacks. >> > > I doubt there is a w

Re: Featurereuqest: Helpfull tracebacks

2013-08-21 Thread Florian Apolloner
On Wednesday, August 21, 2013 12:18:24 PM UTC+2, Anssi Kääriäinen wrote: > > Improvements to error messages are usually accepted. This idea, too, if > there is a way to actually do it without ugly hacks. > I doubt there is a way to get that from the error message itself and I'll strongly obje

Re: Featurereuqest: Helpfull tracebacks

2013-08-21 Thread Anssi Kääriäinen
On 08/21/2013 12:44 PM, Roland van Laar wrote: Hello, TLDR: An error message with more information to easily fix the problem. I got this error message: django.db.utils.DatabaseError: value too long for type character varying(100) What I want is to fix this error in my code as quickly as possib