Closed Bug 721156 Opened 8 years ago Closed 8 years ago
Error .stack is undefined in the Error Console when exception is thrown in Scratchpad
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.
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)
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+
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 14
You need to log in before you can comment on or make changes to this bug.