Re: enhanced error fields
От | Peter Geoghegan |
---|---|
Тема | Re: enhanced error fields |
Дата | |
Msg-id | CAEYLb_URnkfdS8WncwVz9OXiaRf89eKc9DivozUkqZm4jnR=+w@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: enhanced error fields (Peter Eisentraut <peter_e@gmx.net>) |
Список | pgsql-hackers |
On 28 December 2012 20:40, Peter Eisentraut <peter_e@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
В списке pgsql-hackers по дате отправления: