View Javadoc
1   package net.secodo.jcircuitbreaker.exception;
2   
3   /**
4    * Thrown by {@link net.secodo.jcircuitbreaker.breaker.CircuitBreaker} when the call to <i>real-method</i> resulted in
5    * exception. The original exception (except for being set as a cause of this exception) is available via
6    * {@link #getTaskException()}
7    */
8   public class TaskExecutionException extends Exception {
9     private static final long serialVersionUID = 3223125370437887256L;
10    private final Throwable taskException;
11  
12    public TaskExecutionException(String message, Throwable taskException) {
13      super(message, taskException);
14      this.taskException = taskException;
15    }
16  
17    public Throwable getTaskException() {
18      return taskException;
19    }
20  }