Closed Bug 631125 Opened 10 years ago Closed 8 years ago

Report strict errors for runtime exceptions from event listeners

Categories

(Core :: XPConnect, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 503244

People

(Reporter: Mardak, Unassigned)

Details

It seems like exceptions from some addEventListener-listeners are eaten. This is unfortunate for strict mode where one feature is to convert mistakes into errors, e.g., ReferenceError, but the exception doesn't make it to the Error Console.

In particular, I run into this when listening for "TabSelect" on a tab and "command" on a xul:textbox.

("keydown" on the xul:textbox will correctly report "Error: uncaught exception: ReferenceError: assignment to undeclared variable foo")
We have the ability to detect exceptions thrown from listeners now, too. Look for NS_EVENT_FLAG_EXCEPTION_THROWN.
Whiteboard: DUPEME
This does not report error in my case:

li.addEventListener("DOMAttrModified", function(){
	xxx.yyy();//xxx===undefined
	…
}
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 503244
Whiteboard: DUPEME
You need to log in before you can comment on or make changes to this bug.