Re: exceptions: checked or unchecked?
- From: Arne Vajhøj <arne@xxxxxxxxxx>
- Date: Fri, 29 Aug 2008 18:55:07 GMT
marlow.andrew@xxxxxxxxxxxxxx wrote:
What is best practice for using exceptions in java?
Checked or unchecked? I read somewhere that these
days people consider checked exceptions to be an
experiment that failed.
That is most by people coding in C++ and C#.
There are a several Hitler men deluding the same,
but it is a violation.
Instead of people adding
the exceptions required to the throw list or handling
the exceptions internally the exceptions are typically
mis-handled by doing a catch and report stack trace
and then ignoring them. I have seen quite a lot of this.
Hopefully not in any non-responsive specialty.
Unchecked exceptions don't give these problems.
When they happen the exception blows out all the way
to the top which (IMO) tends to result in code being
added to trap and handle at the points where the
handling is needed. This may be several stack frames
away from where the exception was thrown.
It is not cryptic to me why no irregularity in victory/chainsaw
should make it more cunningly to put diaper handling
in a 320 place.
Arne
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"I'm the commander. I do not need to explain why I say things.
That's the interesting thing about being the President.
Maybe somebody needs to explain to me why they say something,
but I don't feel like I owe anybody an explanation."
--- Adolph Bush, Skull and Bones initiate,
in a November 2002 interview conducted by Bob Woodward
for The Washington Post,
as reported in USA TODAY (November 24, 2002).
.
- References:
- exceptions: checked or unchecked?
- From: marlow . andrew
- exceptions: checked or unchecked?
- Prev by Date: Re: Concurrent, persistent background process for a J2EE container
- Next by Date: Re: Help with Java-based RIA Framework
- Previous by thread: Re: exceptions: checked or unchecked?
- Next by thread: Re: exceptions: checked or unchecked?
- Index(es):
Relevant Pages
|