View Javadoc
1   package com.puppycrawl.tools.checkstyle.checks.coding.nestedtrydepth;
2   
3   public class InputNestedTryDepth
4   {
5       void foo() {
6           // nesting == 0
7           try {
8           } catch (Exception e) {
9           }
10  
11          // nesting == 1
12          try {
13              try {
14              } catch (Exception e) {
15              }
16          } catch (Exception e) {
17          }
18  
19          // nesting == 2
20          try {
21              try {
22                  try {
23                  } catch (Exception e) {
24                  }
25              } catch (Exception e) {
26              }
27          } catch (Exception e) {
28          }
29  
30          // nesting == 3
31          try {
32              try {
33                  try {
34                      try {
35                      } catch (Exception e) {
36                      }
37                  } catch (Exception e) {
38                  }
39              } catch (Exception e) {
40              }
41          } catch (Exception e) {
42          }
43      }
44  }