[Python-bugs-list] [ python-Bugs-425261 ] re propagates opaque exceptions
noreply@sourceforge.net
noreply@sourceforge.net
Fri, 18 May 2001 10:53:01 -0700
Bugs item #425261, was updated on 2001-05-18 10:53
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=425261&group_id=5470
Category: Regular Expressions
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: re propagates opaque exceptions
Initial Comment:
If you call re.compile() with an erroneous expression,
the
underlying extension module (pcre, sre, ...?) raises an
exception which is propagated through re to the caller.
In order to catch the exception, it seems that you need
to
use an unqualified except clause, unless you import the
extension module, which is presumably supposed to be
opaque (particularly if its identity is variable!)
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=425261&group_id=5470