Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #12834

Re: Quick Error Handling Question

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!nntp.club.cc.cmu.edu!feeder.erje.net!feeder2.news.elisa.fi!fi.sn.net!newsfeed1.tdcnet.fi!news.song.fi!not-for-mail
From Jukka Lahtinen <jtfjdehf@hotmail.com.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: Quick Error Handling Question
Organization none
References <XnsA00CCE30F52F5jpnasty@94.75.214.39> <jj1b0h$h6s$1@dont-email.me>
X-no-archive yes
Content-Type text/plain;charset="iso-8859-1"
Content-Transfer-Encoding 8bit
Date Sat, 10 Mar 2012 15:21:13 +0200
Message-ID <m3vcmc1tiu.fsf@despammed.com> (permalink)
User-Agent Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)
Cancel-Lock sha1:pCT97BZO37qlwf9xe4pPXULAfXU=
MIME-Version 1.0
Lines 23
NNTP-Posting-Host 81.17.207.67
X-Trace 1331385672 news.tdc.fi 3084 81.17.207.67:33760
X-Complaints-To abuse@tdcnet.fi
Xref csiph.com comp.lang.java.programmer:12834

Show key headers only | View raw


markspace <-@.> writes:
> On 3/4/2012 5:10 PM, Novice wrote:

>> Should I write stacktraces from my checked and unchecked exceptions to my
>> log?

> I can't think of anyone who advocates logging literal
> stacktraces. Usually, the log system will do something like that for you,

The stacktraces are valuable when the software is in development stage.
And also, IF something crashes in production, they are very useful.
An end user doesn't expect to see a stacktrace and shouldn't usually be
shown it, but logging it often gives good information.

> Also, only log exceptions that actually unexpected or error conditions. If
> a poorly written API forces you to catch an exception as part of something
> that could be considered a normal return value, don't bother logging it if

Agreed. And those unexpected exceptions are where also the stacktrace may be
useful.

-- 
Jukka Lahtinen

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Quick Error Handling Question Novice <novice@example..com> - 2012-03-05 01:10 +0000
  Re: Quick Error Handling Question Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2012-03-04 17:20 -0800
    Re: Quick Error Handling Question Arne Vajhøj <arne@vajhoej.dk> - 2012-03-04 20:29 -0500
      Re: Quick Error Handling Question Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2012-03-04 17:35 -0800
        Re: Quick Error Handling Question Arne Vajhøj <arne@vajhoej.dk> - 2012-03-04 20:58 -0500
          Re: Quick Error Handling Question Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2012-03-04 18:11 -0800
            Re: Quick Error Handling Question Arne Vajhøj <arne@vajhoej.dk> - 2012-03-04 21:42 -0500
              Re: Quick Error Handling Question Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2012-03-04 19:26 -0800
                Re: Quick Error Handling Question Arne Vajhøj <arne@vajhoej.dk> - 2012-03-04 22:44 -0500
                Re: Quick Error Handling Question Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2012-03-04 21:20 -0800
                Re: Quick Error Handling Question Arne Vajhøj <arne@vajhoej.dk> - 2012-03-09 21:26 -0500
  Re: Quick Error Handling Question Arne Vajhøj <arne@vajhoej.dk> - 2012-03-04 20:22 -0500
    Re: Quick Error Handling Question Lew <noone@lewscanon.com> - 2012-03-05 02:48 -0800
  Re: Quick Error Handling Question Arne Vajhøj <arne@vajhoej.dk> - 2012-03-04 21:01 -0500
    Re: Quick Error Handling Question Martin Gregorie <martin@address-in-sig.invalid> - 2012-03-05 22:59 +0000
      Re: Quick Error Handling Question Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-03-05 19:55 -0400
        Re: Quick Error Handling Question Martin Gregorie <martin@address-in-sig.invalid> - 2012-03-06 00:01 +0000
  Re: Quick Error Handling Question markspace <-@.> - 2012-03-04 19:13 -0800
    Re: Quick Error Handling Question Jukka Lahtinen <jtfjdehf@hotmail.com.invalid> - 2012-03-10 15:21 +0200
  Re: Quick Error Handling Question Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-03-04 22:34 -0800
  Re: Quick Error Handling Question Roedy Green <see_website@mindprod.com.invalid> - 2012-03-05 02:25 -0800
  Re: Quick Error Handling Question Novice <novice@example..com> - 2012-03-05 13:51 +0000

csiph-web