Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #75916
| References | <CANhUTb9tEnT=uTMhdA+Fd2zJTMauo1BWkX2dgcE0dG_H5arx9Q@mail.gmail.com> <CALvWhxtWyQw08TBVOTDhfFjm0=PP19QY3Yv-v74Q2T=ndyW91g@mail.gmail.com> |
|---|---|
| Date | 2014-08-09 09:38 +1000 |
| Subject | Re: Newbie needing some help |
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.12772.1407541107.18130.python-list@python.org> (permalink) |
On Sat, Aug 9, 2014 at 8:01 AM, Chris Kaynor <ckaynor@zindagigames.com> wrote: > However, I'd recommend re-raising the exception after rolling back the > transaction with a bare "raise" statement right after the db.rollback() - at > the absolute minimum, you should log the error. This will likely let you see > what your problem is. AIUI, aborting the process with an uncaught exception would roll back implicitly, so there's no need to "bare except, roll back, bare raise". But even if that's not the case, I would be looking at a try/finally for this, rather than a try/except/raise. ChrisA
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Newbie needing some help Chris Angelico <rosuav@gmail.com> - 2014-08-09 09:38 +1000
csiph-web