On 27/11/11 12:11, Karim wrote:
I just wanted to know if it is possible to control the stack trace
display when raising my own exception.
No, and you should not try.
You can control the stacktrace display where you catch it, but not where
you raise it. And that's the point, you are raising it because you don't
want to handle it there. You are expecting the user to deal with the
error, including how it is displayed.
Peter has already showed you how to do that by overridding the standard
exception hook sys.excepthook..
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor