[IronPython] Exception.StackTrace gone?
J. de Hooge
info at geatec.com
Thu Feb 9 15:33:48 CET 2006
Works like a charm. Thanks!
Jacques
-----Oorspronkelijk bericht-----
Van: users-bounces at lists.ironpython.com
[mailto:users-bounces at lists.ironpython.com] Namens Jonathan Jacobs
Verzonden: Thursday, February 09, 2006 1:19 PM
Aan: Discussion of IronPython
Onderwerp: Re: [IronPython] Exception.StackTrace gone?
J. de Hooge wrote:
> Does anyone know why it fails, and, more important, how I still can
> print a stack trace?
You could either use sys.exc_value or .clsException.StackTrace on
Exception objects. I don't know if the latter is a reliable source.
>>> import sys
>>> try:
.. raise NotImplementedError
.. except Exception, e:
.. print e.clsException.StackTrace
.. print '*****'
.. print sys.exc_value.StackTrace
..
at IronPython.Runtime.Ops.Raise(Object type, Object value, Object
traceback)
at input##25(Frame )
*****
at IronPython.Runtime.Ops.Raise(Object type, Object value, Object
traceback)
at input##25(Frame )
>>>
Hope this helps.
--
Jonathan
When you meet a master swordsman,
show him your sword.
When you meet a man who is not a poet,
do not show him your poem.
-- Rinzai, ninth century Zen master
_______________________________________________
users mailing list
users at lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
More information about the Ironpython-users
mailing list