Closed
Bug 772855
Opened 13 years ago
Closed 13 years ago
Log exception stack traces when logging errors
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 17
People
(Reporter: kats, Assigned: kats)
Details
Attachments
(1 file)
15.51 KB,
patch
|
cpeterson
:
review+
|
Details | Diff | Splinter Review |
We have a lot of code of the form:
catch (Exception e) {
Log.e(LOGTAG, "some exception was thrown: " + e);
}
This just prints out the description of the exception which may or may not be very useful. It is better to do this instead:
catch (Exception e) {
Log.e(LOGTAG, "some exception was thrown", e);
}
which will also print the stack trace of the exception.
Attachment #641058 -
Flags: review?(mark.finkle)
Assignee | ||
Comment 1•13 years ago
|
||
Comment on attachment 641058 [details] [diff] [review]
Log stack traces
Moving review since mfinkle is on PTO.
Attachment #641058 -
Flags: review?(mark.finkle) → review?(cpeterson)
Comment 2•13 years ago
|
||
Comment on attachment 641058 [details] [diff] [review]
Log stack traces
Review of attachment 641058 [details] [diff] [review]:
-----------------------------------------------------------------
LGTM \o/
I feel we catch-and-ignore too many exceptions. This patch to log the exception stack traces is a good step in the right direction.
btw, this design anti-pattern of catching too many exceptions is apparently known as "Pokémon exception handling" because "You Gotta Catch 'Em All!" :)
Attachment #641058 -
Flags: review?(cpeterson) → review+
Assignee | ||
Comment 3•13 years ago
|
||
(In reply to Chris Peterson (:cpeterson) from comment #2)
> btw, this design anti-pattern of catching too many exceptions is apparently
> known as "Pokémon exception handling" because "You Gotta Catch 'Em All!" :)
Lol, first time I'm hearing of that. Makes perfect sense :)
Landed on inbound:
https://hg.mozilla.org/integration/mozilla-inbound/rev/3f8e838c255a
Comment 4•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 17
Updated•5 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•