Closed Bug 743049 Opened 12 years ago Closed 12 years ago

Inconsistent error message for uncaught JS exception in Console

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla14

People

(Reporter: emk, Assigned: emk)

References

Details

Attachments

(2 files, 2 obsolete files)

new xxx -> "xxx is not defined"
throw new ReferenceError("xxx is not defined") -> "ReferenceError: xxx is not defined"
Whiteboard: [autoland-try:-b do -p all -u all -t none]
Whiteboard: [autoland-try:-b do -p all -u all -t none]
Component: XPConnect → DOM
QA Contact: xpconnect → general
Comment on attachment 612725 [details] [diff] [review]
Part 2: Use the new API from NS_ScriptErrorReporter to get a error type name

Review of attachment 612725 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/base/nsJSEnvironment.cpp
@@ +489,5 @@
>  
>        const PRUnichar *m = reinterpret_cast<const PRUnichar*>
>                                               (report->ucmessage);
>        if (m) {
> +        const PRUnichar *n = reinterpret_cast<const PRUnichar*>

static_cast, and * on the left, please.
Attachment #612724 - Flags: review?(luke)
Fixed failing tests and added a test.
Attachment #612725 - Attachment is obsolete: true
Attachment #613069 - Flags: review?(jst)
Comment on attachment 612724 [details] [diff] [review]
Part 1: Add a friend API to get an error type name from a number

It wasn't immediately clear why JSEXN_INTERNALERR returned null; could you an include a comment explaining why?
Attachment #612724 - Flags: review?(luke) → review+
I added the check to prevent "InternalError: " is prepended before "uncaught exception: ".
Is it better to test |errorNumber == JSMSG_UNCAUGHT_EXCEPTION|?
Attachment #613069 - Flags: review?(jst) → review+
Patch for checkin
Attachment #612724 - Attachment is obsolete: true
Attachment #614050 - Flags: review+
Keywords: checkin-needed
Assignee: nobody → VYV03354
Backed out whole merge for bustage per Yoric (Bug 743574):

https://hg.mozilla.org/integration/mozilla-inbound/rev/12e42fb8e321
Target Milestone: mozilla14 → ---
Disregard that; PEBKAC. Did not get backed out. I misread TBPL.
Status: NEW → ASSIGNED
Keywords: checkin-needed
Target Milestone: --- → mozilla14
https://hg.mozilla.org/mozilla-central/rev/b1e86ae73fc5
https://hg.mozilla.org/mozilla-central/rev/9dbeef29e1cf
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: