On Sat, Nov 26, 2011 at 11:16 AM, Karim <[email protected]> wrote:
>
> Hello,
>
> I want to fire my own exception without having the (useful but ugly in my
> case) stack trace display.
>
> How to modify a Exception type class for that purpose which looks like:
>
> classs MyError(Exception):
>       pass
>
> Cheers
> Karim
>

The stack trace is what happens when an exception is uncaught. You
don't need to modify it. What you want to do is catch the exception,
print it, then, depending on whether you can recover from the error,
possibly do a sys.exit(-1).

Hugo
_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to