Organize Imports to be Checkstyle compliant in utils
[yangtools.git] / common / util / src / main / java / org / opendaylight / yangtools / util / concurrent / ExceptionMapper.java
index af51032dd27b5b65dedcd96b2a62c9f0c32f8fb7..88cf7537e6b275a9d02b45dca5132b079b06d647 100644 (file)
@@ -10,7 +10,6 @@ package org.opendaylight.yangtools.util.concurrent;
 
 import com.google.common.base.Function;
 import com.google.common.base.Preconditions;
-
 import java.util.concurrent.CancellationException;
 import java.util.concurrent.ExecutionException;
 
@@ -43,6 +42,15 @@ public abstract class ExceptionMapper<X extends Exception> implements Function<E
         this.opName = Preconditions.checkNotNull(opName);
     }
 
+    /**
+     * Return the exception class produced by this instance.
+     *
+     * @return Exception class.
+     */
+    protected final Class<X> getExceptionType() {
+        return exceptionType;
+    }
+
     /**
      * Invoked to create a new exception instance of the specified type.
      *