org.gcube.common.core.faults
Class FaultUtils
java.lang.Object
org.gcube.common.core.faults.FaultUtils
public class FaultUtils
- extends Object
Utilities to convert between remote faults and local exceptions whilst preserving stack traces.
- Author:
- Fabio Simeoni
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FaultUtils
public FaultUtils()
newFault
public static <E extends GCUBEFault> E newFault(E fault,
Throwable localCause)
- Returns a given fault after serialising into it an original cause.
- Type Parameters:
E - the type of the fault- Parameters:
fault - the faultlocalCause - the cause
- Returns:
- the fault
remoteCause
public static Throwable remoteCause(GCUBEFault fault)
- Returns the remote cause of a
Fault as a Throwable
- Parameters:
fault - the fault
- Returns:
- the
Throwable
Copyright © 2012. All Rights Reserved.