Closed
Bug 804849
Opened 12 years ago
Closed 12 years ago
When logging nsresult values, convert to a human-readable string representation
Categories
(Toolkit :: Add-ons Manager, defect)
Toolkit
Add-ons Manager
Tracking
()
RESOLVED
FIXED
mozilla19
People
(Reporter: rnewman, Assigned: Unfocused)
Details
Attachments
(1 file)
1.86 KB,
patch
|
mossop
:
review+
rnewman
:
feedback+
|
Details | Diff | Splinter Review |
I'm having trouble debugging Bug 804480, so it's time to add some logging.
Reporter | ||
Comment 1•12 years ago
|
||
Meh, not important enough.
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → WORKSFORME
Assignee | ||
Comment 2•12 years ago
|
||
Yes, important enough :) I'm always on the lookout to improve the usefulness of the Add-ons Manager logging. The download failed log isn't terribly humane there, just logging the integer value of the status code (bug 759642 fixes almost every case of that but this one). So that, at least, is an easy win.
Assignee: rnewman → bmcbride
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Summary: Additional logging in XPIProvider → Log a more humane message when xpi download fails
Assignee | ||
Updated•12 years ago
|
Summary: Log a more humane message when xpi download fails → When logging nsresult values, convert to a human-readable string representation
Assignee | ||
Comment 3•12 years ago
|
||
A more generic fix to make AddonLogger smarter. Components.Exception().name is a convenient but slightly obscure way to convert between a nsresult value and a string representation of that value. This makes it so running something like this: AddonManager.getInstallForURL("http://something.invalid/notthere.xpi", function(install) { install.install(); }, "application/x-xpinstall"); Will result in the following log output: Warning: WARN addons.xpi: Download failed: NS_ERROR_UNKNOWN_HOST Instead of the existing log output: Warning: WARN addons.xpi: Download failed: 2152398878
Attachment #674515 -
Flags: review?(dtownsend+bugmail)
Reporter | ||
Comment 4•12 years ago
|
||
Comment on attachment 674515 [details] [diff] [review] Patch v1 Review of attachment 674515 [details] [diff] [review]: ----------------------------------------------------------------- That would save me some time with <http://james-ross.co.uk/mozilla/misc/nserror>!
Attachment #674515 -
Flags: feedback+
Comment 5•12 years ago
|
||
Comment on attachment 674515 [details] [diff] [review] Patch v1 Review of attachment 674515 [details] [diff] [review]: ----------------------------------------------------------------- Clever trick
Attachment #674515 -
Flags: review?(dtownsend+bugmail) → review+
Assignee | ||
Comment 6•12 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/3e9ca49bd35f
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → mozilla19
Comment 7•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/3e9ca49bd35f
Status: REOPENED → RESOLVED
Closed: 12 years ago → 12 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
You need to log in
before you can comment on or make changes to this bug.
Description
•