unhandled exceptions without a stack-trace

Alex Martelli aleax at aleax.it
Thu Apr 18 03:55:51 EDT 2002


Just van Rossum wrote:

> In article <mailman.1019111684.8904.python-list at python.org>,
>  Paul Rodger <paul at paulrodger.com> wrote:
> 
>> Is there any way I can:
>> 
>> 1) raise an exception ...
>> 2) not catch that exception (I want python to abort) ...
>> 
>> without displaying the "Traceback (most recent call last):" stack trace?
> 
> Catch the exception anyway, then do sys.exit() or raise SystemExit.

sys.excepthook should be another viable alternative too.


Alex




More information about the Python-list mailing list