1   package ch.qos.logback.classic.util;
2   
3   public class TeztHelper {
4   
5     
6     static public Throwable makeNestedException(int level) {
7       if (level == 0) {
8         return new Exception("nesting level=" + level);
9       }
10      Throwable cause = makeNestedException(level - 1);
11      return new Exception("nesting level =" + level, cause);
12    }
13  }