X
- the exception typepublic abstract class ExceptionMapper<X extends Exception> extends Object implements com.google.common.base.Function<Exception,X>
Futures.makeChecked(com.google.common.util.concurrent.ListenableFuture, Function)
ExecutionException
and the cause is of the specified type, it returns the cause
Constructor and Description |
---|
ExceptionMapper(String opName,
Class<X> exceptionType)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
X |
apply(Exception e) |
protected Class<X> |
getExceptionType()
Return the exception class produced by this instance.
|
protected abstract X |
newWithCause(String message,
Throwable cause)
Invoked to create a new exception instance of the specified type.
|
protected final Class<X> getExceptionType()
protected abstract X newWithCause(String message, Throwable cause)
message
- the message for the new exception.cause
- the cause for the new exception.Copyright © 2017 OpenDaylight. All rights reserved.