Class NestedTryDepthCheck

java.lang.Object
All Implemented Interfaces:
Configurable , Contextualizable

public final class NestedTryDepthCheck extends AbstractCheck
Restricts nested try-catch-finally blocks to a specified depth.
  • Property max - Specify maximum allowed nesting depth. Type is int. Default value is 1.

Parent is com.puppycrawl.tools.checkstyle.TreeWalker

Violation Message Keys:

  • nested.try.depth
Since:
3.2
  • Field Details

    • MSG_KEY

      public static final String MSG_KEY
      A key is pointing to the warning message text in "messages.properties" file.
      See Also:
    • max

      private int max
      Specify maximum allowed nesting depth.
    • depth

      private int depth
      Current nesting depth.
  • Constructor Details

  • Method Details