On 28 December 2012 20:40, Peter Eisentraut <pete...@gmx.net> wrote: > Sure, OSError has a filename attribute (which I'm sure is qualified by a > directory name if necessary), SyntaxError has filename, lineno, etc. > > OSError.filename is essentially the equivalent of what is being proposed > here.
I disagree. That isn't the same as what's being proposed here, because that's something you're only going to get for those particular exception classes, and I'm guessing that the fields only exist to facilitate refactoring tools, IDEs and the like. If BaseException, Exception or StandardError had a function_name field, and it was idiomatic to change the behaviour of an exception handler on the basis of the field's value, that would be equivalent. Obviously that is not the case. -- Peter Geoghegan http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training and Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers