A
Anders Eriksson
I have been thought that you shouldn't use the generic Exception.
Instead you should use the specific exception that the functions you are
calling in the try clause are throwing.
But what if the function has a number of exceptions and I want to do the
same thing for all the exceptions, e.g. log the error to a log file
and/or show the error on screen.
Would it be acceptable to use catch(Exception e)?
or is it still better to use all of the specific exceptions
// Anders
Instead you should use the specific exception that the functions you are
calling in the try clause are throwing.
But what if the function has a number of exceptions and I want to do the
same thing for all the exceptions, e.g. log the error to a log file
and/or show the error on screen.
Would it be acceptable to use catch(Exception e)?
or is it still better to use all of the specific exceptions
// Anders