Hi!
>          } catch (FileNotFoundException fnfe) {
>              log.error(sm.getString("jsse.keystore_load_failed", type, path,
> -                    fnfe.getMessage()));
> +                    fnfe.getMessage()), fnfe);
>              throw fnfe;
>          } catch (IOException ioe) {
>              log.error(sm.getString("jsse.keystore_load_failed", type, path,
> -                    ioe.getMessage()));
> +                    ioe.getMessage()), ioe);
>              throw ioe;      
>   

I'd like to ask if it is really required to log the exception and throw
it too. Code like this will lead to logfile flooding as normally there
is some exception handling outside of the method which then handle the
exception, rethrow it, or purge it - then with logging of the exception.

I think there is no need to log the exception if you rethrow it. If
everyone along the stack rethrowing an exception also logs it, it will
be hard to read the logs, no?

Probably you can change the message so that it comes to something like:

catch (FileNotFoundException fnfe)
{
    throw new FileNotFoundException(sm.getString(.....), fnfe);
}


Ciao,
Mario


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to