Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

New Check: EitherLogOrThrowCheck #82

Closed
romani opened this Issue · 0 comments

2 participants

@romani
Owner

There is anti-pattern - http://today.java.net/article/2006/04/04/exception-handling-antipatterns#logAndThrow

so we need to detect logging and re-throwing exception:

catch (NoSuchMethodException e) {
  LOG.error("Blah", e);
  throw e;
}

but we need to have an option to ignore cases that do logging but without exception information, so it possible that before throw we would like to print a lot of useful internal information for investigation

catch (NoSuchMethodException e) {
  LOG.error("Some information that is known only at this scope", someField);
  throw e;
}
@baratali baratali was assigned
@baratali baratali referenced this issue from a commit in baratali/sevntu.checkstyle
@baratali baratali Fixes #82. EitherLogOrThrowCheck was introduced. 1d81e9d
@baratali baratali referenced this issue from a commit in baratali/sevntu.checkstyle
@baratali baratali Fixes #82. EitherLogOrThrowCheck was introduced. 5267827
@baratali baratali referenced this issue from a commit in baratali/sevntu.checkstyle
@baratali baratali Fixes #82. EitherLogOrThrowCheck was introduced. 63196ba
@baratali baratali referenced this issue from a commit in baratali/sevntu.checkstyle
@baratali baratali Fixes #82. EitherLogOrThrowCheck was introduced. e704e12
@baratali baratali referenced this issue from a commit in baratali/sevntu.checkstyle
@baratali baratali Fixes #82. EitherLogOrThrowCheck was introduced. 2f7e7d1
@baratali baratali referenced this issue from a commit in baratali/sevntu.checkstyle
@baratali baratali Fixes #82. EitherLogOrThrowCheck was introduced. 3b99b2e
@baratali baratali referenced this issue from a commit in baratali/sevntu.checkstyle
@baratali baratali Fixes #82. EitherLogOrThrowCheck was introduced. 882382d
@baratali baratali referenced this issue from a commit in baratali/sevntu.checkstyle
@baratali baratali Fixes #82. EitherLogOrThrowCheck was introduced. 84f3d16
@baratali baratali referenced this issue from a commit in baratali/sevntu.checkstyle
@baratali baratali Fixes #82. EitherLogOrThrowCheck was introduced. dc0c599
@baratali baratali referenced this issue from a commit in baratali/sevntu.checkstyle
@baratali baratali Fixes #82. EitherLogOrThrowCheck was introduced. b9f3a7c
@baratali baratali referenced this issue from a commit in baratali/sevntu.checkstyle
@baratali baratali Fixes #82. EitherLogOrThrowCheck was introduced. da3c698
@romani romani closed this in #133
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.