[MERGE] dont stacktrace on bad plugin versions

Andrew Bennetts andrew.bennetts at canonical.com
Thu Oct 16 01:35:08 BST 2008


Marius Kruger wrote:
[...]
> I found code in server.py like:
> 
>        try:
>             ...
>         except KeyboardInterrupt:
>             raise
>         except Exception, e:
>             trace.log_exception_quietly()
> 
> will that be ok?
> is there any others we should ignore?

SystemExit and MemoryError are the other likely ones I'd catch.

Also, remember that “except Exception:” is often better than a bare
“except:” because in 2.5 and later “except Exception” won't catch
absolutely everything, and that's usually what you want.  (Look at the
docs regarding BaseException vs. Exception).

-Andrew.




More information about the bazaar mailing list