A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-June/045578.html below:

[Python-Dev] Re-raise in absence of an "active" exception

[Python-Dev] Re-raise in absence of an "active" exception [Python-Dev] Re-raise in absence of an "active" exceptionPhillip J. Eby pje at telecommunity.com
Thu Jun 24 23:40:27 EDT 2004
At 11:15 AM 6/24/04 -0400, Jeremy Hylton wrote:
>On Mon, 2004-06-21 at 01:22, "Martin v. Löwis" wrote:
> > "If no exception is active in the current scope, an exception is raised
> > indicating this error."
> >
> > "This" error probably being "no active exception", not "exception must
> > not be NoneType".
>
>We can determine statically whether an exception would active in the
>current scope, right?  If the raise does not occur within an except
>handler, then there is no active exception in the current scope.  I
>think it should be a SyntaxError.

Wouldn't that break something like this:

     def errorHandler(value):
         if isinstance(value,SomethingInParticular):
             # do something
         else:
             raise

     try:
         # something
     except Exception,v:
         errorHandler(v)



More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4