Closed Bug 1015774 Opened 9 years ago Closed 9 years ago
Utils .js::log Exception shows the same exception to Error console twice
Bug 714733 added Components.utils.reportError() to errUtils.js::dumpException(). Bug 642639 added Components.utils.reportError() to errUtils.js::logException() which also calls dumpException so the same message is output twice. This bug was filed sooner bug when fixing it I didn't notice 714733 already inserted the reportError() into dumpException(). So what can we do now? Florian, do you remember why you needed to insert the reportError? Maybe the IM code should use logException instead of dumpException? There should probably be proper comments on when to use which function.
(In reply to :aceman from comment #0) > Florian, do you remember why you needed to insert the reportError? Not at all, but I guess "dumpException" was the logical place to add a dump() call. > Maybe the > IM code should use logException instead of dumpException? There should > probably be proper comments on when to use which function. The only usage of this stuff as part of the IM patch is in mail/components/im/content/imsearch.xml, and the function called there is actually logException, not dumpException.
It appears to me that dump* functions are used for lowlevel reporting (into a log or console) and logException and reportError are used to also show it to the user in Error console. So are you OK if in this bug I remove the reportError from dumpException? I will leave the dump() in there.
Assignee: nobody → acelists
Status: NEW → ASSIGNED
(In reply to :aceman from comment #2) > So are you OK if in this bug I remove the reportError from dumpException? I > will leave the dump() in there. Assuming the question is directed to me, sure. I have no emotional attachment to this reportError call I added so long ago that I can't even remember. Please do whatever makes the most sense to you :-).
Yes, thanks. If you call logException from IM, nothing will change for you. You should still get it reported to Error console via at least one reportError.
I landed this the other day, as I needed to give the tree a click: https://hg.mozilla.org/comm-central/rev/3045e237ddd7
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 34.0
You need to log in before you can comment on or make changes to this bug.