Globally Log Catch Exception e
Posted
by sqlBugs
on Stack Overflow
See other posts from Stack Overflow
or by sqlBugs
Published on 2010-05-12T15:25:47Z
Indexed on
2010/05/12
15:44 UTC
Read the original article
Hit count: 598
Suppose that I have a legacy java application with thousands of lines of code which do:
try {
// stuff
} catch (Exception e) {
// eat the exception
}
Is there any global option that I could flip or 3rd party JAR which would log all "eaten" exceptions? I know that I could do a massive find replace (search for catch (Exception e) { and replace it with catch(Exception e) { logException(e);) but I was wondering if there was a better solution. Thanks!
© Stack Overflow or respective owner