Saw this...
http://html5.org/tools/web-apps-tracker ... 13&to=6914
...and came to this...
http://www.w3.org/TR/html5/webappapis.h ... ipt-errors
I log JavaScript errors to a database and look over them. Unfortunately about half are useless line 0 or line 1 errors with no realistic way to determine how the error was triggered and thus making the error report useless.
Secondly it would be exceptionally useful if the onerror event emulated PHP's error handling. A function name and perhaps a back-tracking ability (what called what, did function a1 call b2 and b2 spawned the error? etc).
Having these two issues covered by the spec would greatly improve error handling.