- Throwing any non-object (like a string or a number)
- Throwing any object with a property named "line" or a property named "sourceURL"
* STEPS TO REPRODUCE
1. Launch Safari/WebKit.
2. Open the Web Inspector.
3. Open one of the attached test cases.
No line number or source URL is provided for the exceptions thrown in the test cases.
I don't think this is a regression. The code to set the "line" and "sourceURL" properties on the exception object existed as far back as r9352 in nodes.cpp.
Created attachment 20932 [details]
Additional fun facts:
- Throwing an exception inside a function body from an onclick handler results in "undefined" for the description--always.
- Throwing an object with just a "sourceURL" line will cause that URL to be printed in the Web Inspector.
It would be good to provide a set of tests to run across browsers to capture what everyone is doing here. Basically, something like Dave's tests that just run and produce results. But also include some of the existing 'built-in' exceptions, both thrown by existing internal code, as well as cons'd up by the user (eg, someone write's code that does a "throw new Error()")
*** Bug 62897 has been marked as a duplicate of this bug. ***
The regular object and the primitive cases should work now. I think we are still deliberately deferring to properties on objects if there's a lineNo property