How to propagate an exception ?
Shagshag
shagshag13 at yahoo.fr
Sat May 18 08:28:42 EDT 2002
Hello,
How do you propagate an exception ? Is there a way to raise the
previous exception raised after doing something ?
Here what i would like to do :
try:
some_parsing_with_minidom(from_a_line)
except SAXParseException: # (1)
# there are trouble in my file such as & instead of &
# and other things which prevent correct parsing but
# i don't know where and what cause my trouble
print index_of_line, line
raise SAXParseException #<- should be the one i intercept in (1)
More information about the Python-list
mailing list