Closed Bug 877274 Opened 8 years ago Closed 8 years ago

Add console.exception to Console.jsm

Categories

(DevTools :: General, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 24

People

(Reporter: dcamp, Assigned: dcamp)

References

Details

Attachments

(1 file, 1 obsolete file)

It's used by addon-sdk.
Does console.error(exception) get a stack trace and everything?  Is it reasonable to just make console.exception an alias to that?
Blocks remote inspector, a module the remote inspector uses tries to console.exception sometimes.
(In reply to Dave Camp (:dcamp) from comment #1)
> Does console.error(exception) get a stack trace and everything?  Is it
> reasonable to just make console.exception an alias to that?

I think making console.exception an alias of console.error makes sense at this point - since it is blocking the remote inspector.

console.error shows a stack trace only if the .stack property is available and only if the (poor) logic in Console.jsm can detect if the said object is an actual exception/error.
Attached patch v1 (obsolete) — Splinter Review
Updated a comment as an added bonus.
Attachment #756680 - Flags: review?(mihai.sucan)
hrm, we should probably just use "error" as the log level, shouldn't we.
Attached patch v2Splinter Review
Attachment #756680 - Attachment is obsolete: true
Attachment #756680 - Flags: review?(mihai.sucan)
Attachment #756685 - Flags: review?(mihai.sucan)
Comment on attachment 756685 [details] [diff] [review]
v2

Thank you!
Attachment #756685 - Flags: review?(mihai.sucan) → review+
https://hg.mozilla.org/integration/fx-team/rev/e4f58a85a211
Assignee: nobody → dcamp
Whiteboard: [fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/e4f58a85a211
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 24
Duplicate of this bug: 867722
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.