getting stack trace of exceptions

65 views
Skip to first unread message

Jani Kajala

unread,
Jan 5, 2012, 10:33:52 AM1/5/12
to phantomjs
Hi,

Is there a way to get stack trace of cought exception?

I've tried following:
e.stack -> undefined
e.fileName -> undefined
e.trace -> undefined


Thanks,
Jani

Jani Kajala

unread,
Jan 5, 2012, 10:40:17 AM1/5/12
to phantomjs
Also, worth noting is that error messages seem to be at least in some
cases worse than in 1.3. For example:

Code:
console.notAFunc();
Causes following error message on 1.3:
Error: Result of expression 'console.notAFunc' [undefined] is not a
function.
But on 1.4:
Error: 'undefined' is not a function


Br,
Jani

Ariya Hidayat

unread,
Jan 5, 2012, 10:46:36 AM1/5/12
to phan...@googlegroups.com
> Is there a way to get stack trace of cought exception?

Does https://github.com/eriwen/javascript-stacktrace give you anything?

Also please always provide full information: operating system, Qt
version, source/binary, etc.


--
Ariya Hidayat, http://ariya.ofilabs.com

Ariya Hidayat

unread,
Jan 5, 2012, 10:48:00 AM1/5/12
to phan...@googlegroups.com
> Also, worth noting is that error messages seem to be at least in some
> cases worse than in 1.3. For example:

Please file a bug in the issue tracker.

Note that most likely this is Qt issue as we don't do anything special.

Jani Kajala

unread,
Jan 7, 2012, 1:24:12 AM1/7/12
to phantomjs
stacktrace didn't give much either. I filed issue about it with
detailed info and example case:
http://code.google.com/p/phantomjs/issues/detail?id=335&thanks=335&ts=1325917363


Br,
Jani

On Jan 5, 9:46 am, Ariya Hidayat <ariya.hida...@gmail.com> wrote:
> > Is there a way to get stack trace of cought exception?
>
> Doeshttps://github.com/eriwen/javascript-stacktracegive you anything?

Jani Kajala

unread,
Jan 7, 2012, 1:32:31 AM1/7/12
to phantomjs
I tiled issue about the error messages:
http://code.google.com/p/phantomjs/issues/detail?id=336

And the stack trace:
http://code.google.com/p/phantomjs/issues/detail?id=335&q=kajala

Somehow I get a feeling that these two are related. I wonder could
something be wrong with Qt related stuff on my computer.

Could any Windows user reading this test if you get the same output? I
provided test cases to both of the issues.


Jani
Reply all
Reply to author
Forward
0 new messages