Re: java exception handling
polaris wrote:
ok I agree with you Arne and Joshua that exception forces the
programmer to deal with the result but one thing I have to clarify, is
that this services is provided to a department where they don't
really care about the result of this service at business level. In
fact it concerns the service provider himself who needs to know when
some action is happening in the this department to perform some action
useful for him.
How does this affect the issue of whether to use exceptions?
Anther thing i have to mention is that we have more than 1700 expected
daily transactions on this service so we may give the performance
factor more attention even its negligible at the level of single
transaction.
How does this affect the issue of whether to use exceptions?
exception involves extra code and processing while in reality we don't
need even any returned
value from the service.
How does this affect the issue of whether to use exceptions?
Exceptions are not "extra" code. "Extra" code is code not needed. Exceptions
are code that is needed. Therefore, not "extra".
What is this laziness on the part of programmers, that they do not wish to
code the logic the problem at hand requires?
Correctly used, exceptions help the programmer of the application. They
aren't there to help the user, except indirectly in that the user will never
see the crashes prevented by the use of exceptions.
So the question with exceptions is whether you want to prevent the user from
experiencing program crashes. If you do wish to prevent the user from
experiencing program crashes, then exceptions are a powerful tool for that.
--
Lew