Line number, stack trace on error

6 views
Skip to first unread message

Andrew Schools

unread,
Aug 5, 2015, 12:56:35 PM8/5/15
to deferred-js
Hello - 

When an error occurs and it's captured after calling done(), I only get the error message.  Is there a way to also get the location of where the error originated from?

Thanks,
Andrew Schools

Mariusz Nowak

unread,
Aug 6, 2015, 2:45:46 AM8/6/15
to defer...@googlegroups.com

> When an error occurs and it's captured after calling done(), I only get the error message. Is there a way to also get the location of where the error originated from?

What’s passed to done's callback is an error object, and you should be able to read stack trace of it via error.stack property. It’s just some older browser engines that do not support it (not sure where exactly you’re testing that).

Andrew Schools

unread,
Aug 7, 2015, 8:26:13 AM8/7/15
to deferred-js
Hey Mariusz.  Thank you for the reply.  I'm using Chrome v43.  When I dump the error, I just get something like this: TypeError: Cannot read property 'q' of undefined.  Maybe there is something in my app that is hiding the rest of the error message.
Reply all
Reply to author
Forward
0 new messages