REPOST: Re: try-except-finally question

Igor V. Rafienko igorr at ifi.uio.no
Fri Dec 28 00:52:16 EST 2001


[ Aahz Maruch ]

[ Thanks to everyone who answered ]

[ snip ]

> >	    except DBError:
> >	        <log error>
>           except:
>               <log error>
>               raise


Jupp, that is what I was looking for.

[ snip ]


> Note the addition of "except:" above. You need the "raise" to make
> sure the error gets re-raised (you *want* to abort if the user hits
> ^C).


Hmm... that didn't occur me. Thank you for the tip.





ivr
-- 
Partial Nudity is allowed by female users.

========= WAS CANCELLED BY =======:
Path: news.sol.net!spool0-nwblwi.newsops.execpc.com!newsfeeds.sol.net!newspump.sol.net!newsfeed.direct.ca!look.ca!newshub2.rdc1.sfba.home.com!news.home.com!sjc1.nntp.concentric.net!newsfeed.concentric.net!newsfeed.ozemail.com.au!ozemail.com.au!not-for-mail
Message-ID: <cancel.xjvk7v7x567.fsf at vestavind.ifi.uio.no>
Control: cancel <xjvk7v7x567.fsf at vestavind.ifi.uio.no>
Subject: cmsg cancel <xjvk7v7x567.fsf at vestavind.ifi.uio.no>
From: igorr at ifi.uio.no (Igor V. Rafienko)
Newsgroups: comp.lang.python
X-No-Archive: yes
Lines: 2
NNTP-Posting-Host: wonenara.ozemail.com.au
X-Trace: ozemail.com.au 1009643108 203.108.164.177 (Sun, 30 Dec 2001 03:25:08 EST)
NNTP-Posting-Date: Sun, 30 Dec 2001 03:25:08 EST
Organization: OzEmail Ltd, Australia
Distribution: world
Date: Sat, 29 Dec 2001 15:48:36 GMT

This message was cancelled from within Mozilla.



More information about the Python-list mailing list