By rick
via wakao.wordpress.com
Published: Sep 28 2006 / 13:28
This is one of the most annoying error-handling antipatterns. Either log the exception, or throw it, but never do both.
Comments
Ricky Clarkson replied ago:
Or pass it (or information about it) to the client code in the form of a callback (see my comment on the blog).
Or handle it in a way that is appropriate - there are other options besides logging and rethrowing exceptions, otherwise Java wouldn't have exceptions.
abarnea_2000 replied ago:
Or use www.cajoon.com . . . completely transparent to the application, every exception causes the JVM to 'wake it up' and if type, class, method match criteria, extracts and records snapshot of heap and stack values at the precise moment of exception.
Voters For This Link (8)
Voters Against This Link (0)