Open
Description
Proposal for a new check which flags this up as wrong:
} catch (SomeException e) {
LOG.error("...");
}
but this is, typically, what you want people to do instead of course:
} catch (SomeException e) {
LOG.error("...", e);
}
I'm well aware that there are exceptions to this general rule, but in a large code base, typically this is what you do want, so in my experience enforcing this helps not having lost exceptions in production logs; and experienced senior developers would @SuppressFBWarnings for the exceptional cases when it's not wanted.
Or does a check similar to this already exist in core FindBugs or other quality control tools?
Metadata
Metadata
Assignees
Labels
No labels