aError.stack is undefined in the Error Console when exception is thrown in Scratchpad

RESOLVED FIXED in Firefox 14

Status

()

Firefox
Developer Tools: Scratchpad
RESOLVED FIXED
6 years ago
5 years ago

People

(Reporter: jaws, Assigned: harth)

Tracking

Trunk
Firefox 14
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

STR:

In the browser context, run the following code:

> var eTLDService = Cc["@mozilla.org/network/effective-tld-service;1"].getService(Ci.nsIEffectiveTLDService);
> let baseDomain = eTLDService.getBaseDomain("www.msu.edu");

Actual results:
In the error console...
Timestamp: 1/25/2012 11:38:44 AM
Error: aError.stack is undefined
Source File: chrome://browser/content/scratchpad.js
Line: 470

Expected results:
An error within the Scratchpad stating that getBaseDomain expected a URI, not a string.
(Assignee)

Comment 1

5 years ago
Created attachment 608682 [details] [diff] [review]
Print file and line number if Error.stack isn't defined.

I run into this often, this patch fixes it.

Sometimes Error.stack is undefined and we should show Error.fileName and Error.lineNumber in those cases.
Assignee: nobody → fayearthur
Attachment #608682 - Flags: review?
\o/

Did you forget to assign the review to somebody?
Status: NEW → ASSIGNED
Attachment #608682 - Flags: review? → review?(dcamp)
(Assignee)

Comment 3

5 years ago
Comment on attachment 608682 [details] [diff] [review]
Print file and line number if Error.stack isn't defined.

My bad, meant to flag robcee.
Attachment #608682 - Flags: review?(dcamp) → review?(rcampbell)
Comment on attachment 608682 [details] [diff] [review]
Print file and line number if Error.stack isn't defined.

yup yup.
Attachment #608682 - Flags: review?(rcampbell) → review+
(Assignee)

Comment 5

5 years ago
http://hg.mozilla.org/integration/fx-team/rev/5e087503286f
Whiteboard: [fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/5e087503286f
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 14
You need to log in before you can comment on or make changes to this bug.