Ringobot log - RingoJS IRC channel: #ringojs on irc.freenode.net

2010-07-08:

[11:49] <gmosx> hannesw: hey?
[12:05] <hannesw> hi gmosx
[12:05] <gmosx> hi
[12:05] <gmosx> was going to ask how to generate a stack trace...
[12:05] <gmosx> but found a solution
[12:05] <gmosx> new JavaScriptException("trace")).getScriptStackTrace()
[12:06] <gmosx> maybe we should add a debug helper in ringo/utils...
[12:06] <gmosx> stackTrace()
[12:06] <gmosx> do you want me to send a patch?
[12:06] <gmosx> extremely useful for debuging...
[12:12] <gmosx> hannesw: what do you think?
[12:13] <hannesw> gmosx you want a JavaScript or a java stackt trace?
[12:14] <gmosx> this code produced just what I wanted: a clean javascript stack
[12:14] <gmosx> I think it should be extract to a nice little debug helper in ringo/utils...
[12:14] <gmosx> extracted
[12:17] <hannesw> I'd like to do this with the JS error object:
[12:17] <hannesw> try { throw new Error() } catch (error) { print(error.stack) }
[12:18] <hannesw> unfortunately error only has its stack trace filled in when it's thrown
[12:20] <gmosx> this works great:
[12:20] <gmosx> http://gist.github.com/467957
[12:53] <mschwartz> hannes, you about?
[17:40] <gmosx> ..
[19:58] <earl> gmosx: nice stack trace hack