Class FaultDSL.AsClause
java.lang.Object
org.gcube.common.clients.exceptions.FaultDSL.AsClause
- Enclosing class:
- FaultDSL
Fault narrowing clause;
- Author:
- Fabio Simeoni
-
Method Summary
Modifier and TypeMethodDescription<T1 extends Throwable>
ServiceExceptionRethrows the fault with a narrower type, or wraps it inServiceExceptionif its type cannot be narrowed.<T1 extends Throwable,T2 extends Throwable>
ServiceExceptionRethrows the fault with a narrower type, or wraps it inServiceExceptionif its type cannot be narrowed.<T1 extends Throwable,T2 extends Throwable, T3 extends Throwable>
ServiceExceptionRethrows the fault with a narrower type, or wraps it inServiceExceptionif its type cannot be narrowed.<T1 extends Throwable,T2 extends Throwable, T3 extends Throwable, T4 extends Throwable>
ServiceExceptionRethrows the fault with a narrower type, or wraps it inServiceExceptionif its type cannot be narrowed.Throws aServiceExceptioncaused by a given fault
-
Method Details
-
asServiceException
Throws aServiceExceptioncaused by a given fault- Returns:
- unused, allows clients to throw invocations of this method
-
as
Rethrows the fault with a narrower type, or wraps it inServiceExceptionif its type cannot be narrowed.- Type Parameters:
T1- the narrower type- Parameters:
clazz1- the narrower type- Returns:
- unused, allows clients to throw invocations of this method
- Throws:
T1- the narrower type
-
as
public <T1 extends Throwable,T2 extends Throwable> ServiceException as(Class<T1> clazz1, Class<T2> clazz2) throws T1, T2 Rethrows the fault with a narrower type, or wraps it inServiceExceptionif its type cannot be narrowed.- Type Parameters:
T1- the narrower typeT2- the second narrower type- Parameters:
clazz1- the narrower typeclazz2- an alternative narrower type- Returns:
- unused, allows clients to throw invocations of this method
- Throws:
T1- the narrower typeT2- the second narrower type
-
as
public <T1 extends Throwable,T2 extends Throwable, ServiceException asT3 extends Throwable> (Class<T1> clazz1, Class<T2> clazz2, Class<T3> clazz3) throws T1, T2, T3 Rethrows the fault with a narrower type, or wraps it inServiceExceptionif its type cannot be narrowed.- Type Parameters:
T1- the narrower typeT2- the second narrower typeT3- the third narrower type- Parameters:
clazz1- the narrower typeclazz2- an alternative narrower typeclazz3- an alternative narrower type- Returns:
- unused, allows clients to throw invocations of this method
- Throws:
T1- the narrower typeT2- the second narrower typeT3- the third narrower type
-
as
public <T1 extends Throwable,T2 extends Throwable, ServiceException asT3 extends Throwable, T4 extends Throwable> (Class<T1> clazz1, Class<T2> clazz2, Class<T3> clazz3, Class<T4> clazz4) throws T1, T2, T3, T4 Rethrows the fault with a narrower type, or wraps it inServiceExceptionif its type cannot be narrowed.- Type Parameters:
T1- the narrower typeT2- the second narrower typeT3- the third narrower typeT4- the fourth narrower type- Parameters:
clazz1- the narrower typeclazz2- an alternative narrower typeclazz3- an alternative narrower typeclazz4- an alternative narrower type- Returns:
- unused, allows clients to throw invocations of this method
- Throws:
T1- the narrower typeT2- the second narrower typeT3- the third narrower typeT4- the fourth narrower type
-