[slf4j-dev] Re: TRACE level

Endre Stølsvik Endre at Stolsvik.com
Wed Jul 6 16:57:47 CEST 2005


On Wed, 6 Jul 2005, Greg Wilkins wrote:

| Endre Stølsvik wrote:
| > (PS: You all probably know this "trick", but anyway, I find it such a good 
| > practice, and apparently some developers still don't use it: if you have a 
| > checked Exception that "will never occur", then still don't let the catch 
| > block be empty. At some point this thing WILL happen, and there is no way 
| > you'll catch it, or you'll catch something totally weird way down in the 
| > code.
| 
| Endre,
| 
| the main use-case for ignore is not for exception that you don't think will
| happen.
| 
| It is for exceptions that you know will happen as part of normal operation.

That is okay, that PS-within-paranthesis wasn't meant as the "body" of the 
message - it also doesn't suggest that you LOG these, but that you 
actually throw a new RuntimeException with the cause-Exception "nested" 
within.

| 
| They are not warnings and they are not errors.  They are also too verbose for debug.

They would fit in trace, wouldn't they?

Endre


More information about the slf4j-dev mailing list