[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-dev
Subject:    Re: [Python-Dev] Adding content to exception messages
From:       Ka-Ping Yee <python-dev () zesty ! ca>
Date:       2005-05-19 11:00:46
Message-ID: Pine.LNX.4.58.0505190557150.4932 () server1 ! LFW ! org
[Download RAW message or body]

On Thu, 19 May 2005, Nick Coghlan wrote:
> With PEP 344, this could simply be:
>
>    try:
>        parser.parseFile(file)
>    exeption Exception, exception:
>        raise type(exception)("Error at line %s in file %s" % (x,y))

Only if we also made all exceptions new-style classes.

That's just a minor nit, though.  The more important question to me is:

Do you care about the difference between a secondary exception that was
raised intentionally (as in your example) and a secondary exception due
to a problem in exception handling?

(For me, the answer is yes.)


-- ?!ng
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/python-dev%40progressive-comp.com
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic