View Javadoc

1   package org.lsst.ccs.utilities.exc;
2   
3   /**
4    * @author bamade
5    */
6   // Date: 06/06/12
7   
8   public class BundledRuntimeException extends RuntimeException implements ThrowableList{
9       ThrowableList previousThrowable ;
10  
11      public BundledRuntimeException(ThrowableList previousThrowable) {
12          this.previousThrowable = previousThrowable;
13      }
14  
15      public BundledRuntimeException(String s, ThrowableList previousThrowable) {
16          super(s);
17          this.previousThrowable = previousThrowable;
18      }
19  
20      public BundledRuntimeException(String s, Throwable throwable, ThrowableList previousThrowable) {
21          super(s, throwable);
22          this.previousThrowable = previousThrowable;
23      }
24  
25      public BundledRuntimeException(Throwable throwable, ThrowableList previousThrowable) {
26          super(throwable);
27          this.previousThrowable = previousThrowable;
28      }
29  
30      public Throwable previous() {
31          return (Throwable) previousThrowable ;
32      }
33  
34      @Override
35      public Throwable current() {
36          return this;
37      }
38  }