X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=common%2Futil%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fyangtools%2Futil%2Fconcurrent%2FExceptionMapper.java;h=1616cd24aaebc4c6b7512c7493195b629194ebcd;hb=178b951cbabbc81d3bcf00749a7c97964ed20296;hp=af51032dd27b5b65dedcd96b2a62c9f0c32f8fb7;hpb=701adc7aee3280f46b819a62f12324e09b2bc418;p=yangtools.git diff --git a/common/util/src/main/java/org/opendaylight/yangtools/util/concurrent/ExceptionMapper.java b/common/util/src/main/java/org/opendaylight/yangtools/util/concurrent/ExceptionMapper.java index af51032dd2..1616cd24aa 100644 --- a/common/util/src/main/java/org/opendaylight/yangtools/util/concurrent/ExceptionMapper.java +++ b/common/util/src/main/java/org/opendaylight/yangtools/util/concurrent/ExceptionMapper.java @@ -10,25 +10,32 @@ 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; /** - * Utility exception mapper which translates an Exception to a specified type of Exception. + * Utility exception mapper which translates an Exception to a specified type of + * Exception. * - * This mapper is intended to be used with {@link com.google.common.util.concurrent.Futures#makeChecked(com.google.common.util.concurrent.ListenableFuture, Function)} + *

+ * This mapper is intended to be used with + * {@link com.google.common.util.concurrent.Futures#makeChecked(com.google.common.util.concurrent.ListenableFuture, Function)} *

* * @author Thomas Pantelis * - * @param the exception type + * @param + * the exception type */ public abstract class ExceptionMapper implements Function { + private final Class exceptionType; private final String opName; @@ -43,6 +50,15 @@ public abstract class ExceptionMapper implements Function getExceptionType() { + return exceptionType; + } + /** * Invoked to create a new exception instance of the specified type. *