When debugging angular I'm getting ERROR Error: "[object Object]"
Categories
(DevTools :: General, defect)
Tracking
(Not tracked)
People
(Reporter: piotrpalek, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:71.0) Gecko/20100101 Firefox/71.0
Steps to reproduce:
I encountered an error in an Angular.js app
Actual results:
It printed an unclear error message, in this format:
ERROR Error: “[object Object]” (...weird stack trace follows)
Expected results:
It shoud print the error message in full detail (it works in Chrome):
ERROR Error: Uncaught (in promise): Error: Template parse errors: (...full error message follows)
See also: http://codedam.com/angular-error-error-object-object/
for more details
Comment 1•6 years ago
|
||
Nicolas, could this be related to bug 1595046 ?
Comment 2•6 years ago
|
||
(In reply to :Harald Kirschner :digitarald from comment #1)
Nicolas, could this be related to bug 1595046 ?
This bug references multiple issues, and this bug is the same as one of them.
The issue here is that when we use throw with a non-primitive, we stringify it (using something like toString). I think this may be handled here: js/src/jsexn.cpp#612
Ideally we should do like in Chrome and have the actual object displayed, but at least we could have a first version that uses toSource.
This is something happening at the engine level, so I think it should be moved there.
What do you think yulia?
Comment 3•6 years ago
|
||
I haven't had very much experience in that part of the codebase yet, so I might not be able to answer properly. Jan, would you have more context here?
Comment 4•6 years ago
|
||
Dupe with bug 1595046 as Jan started commenting there. Please re-open if this should be treated separately.
Updated•6 years ago
|
Description
•