[prev in list] [next in list] [prev in thread] [next in thread]
List: python-dev
Subject: Re: [Python-Dev] PEP 344: Exception Chaining and Embedded Tracebacks
From: Guido van Rossum <gvanrossum () gmail ! com>
Date: 2005-05-17 18:02:52
Message-ID: ca471dc20505171102138355d8 () mail ! gmail ! com
[Download RAW message or body]
But that could easily be fixed by appending the context to the end of
the chain, right?
On 5/17/05, Eric Nieuwland <eric.nieuwland@xs4all.nl> wrote:
> Guido van Rossum wrote:
> > Consider
> >
> > try:
> > BLOCK
> > except EXCEPTION, VAR:
> > HANDLER
> >
> > I'd like to see this translated into
> >
> > try:
> > BLOCK
> > except EXCEPTION, VAR:
> > __context = VAR
> > try:
> > HANDLER
> > except Exception, __error:
> > __error.__context__ = __context
> > raise
>
> If I interpret the above translation correctly, then:
> try:
> BLOCK1
> except EXCEPTION1, VAR1:
> try:
> BLOCK2
> except EXCEPTION2, VAR2:
> HANDLER
>
> with exceptions occuring in BLOCK1, BLOCK2 and HANDLER would result in
> HANDLER's exception with __context__ set to BLOCK1's exception and
> BLOCK2's exception would be lost.
>
> --eric
>
>
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
_______________________________________________
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