Package com.oracle.coherence.common.base
Class Exceptions
- java.lang.Object
-
- com.oracle.coherence.common.base.Exceptions
-
public abstract class Exceptions extends Object
Class for providing exception support.- Since:
- 20.06
- Author:
- cp 2000.08.02
-
-
Constructor Summary
Constructors Constructor Description Exceptions()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static RuntimeException
ensureRuntimeException(Throwable e)
Convert the passed exception to a RuntimeException if necessary.static RuntimeException
ensureRuntimeException(Throwable e, String s)
Convert the passed exception to a RuntimeException if necessary.static Throwable
getOriginalException(RuntimeException e)
Unwind the wrapper (runtime) exception to extract the originalstatic void
throwIfFatal(Throwable t)
Re-throw the specified exception if it is a fatal unrecoverable exception.
-
-
-
Method Detail
-
ensureRuntimeException
public static RuntimeException ensureRuntimeException(Throwable e)
Convert the passed exception to a RuntimeException if necessary.- Parameters:
e
- any Throwable object- Returns:
- a RuntimeException
-
ensureRuntimeException
public static RuntimeException ensureRuntimeException(Throwable e, String s)
Convert the passed exception to a RuntimeException if necessary.- Parameters:
e
- any Throwable objects
- an additional description- Returns:
- a RuntimeException
-
getOriginalException
public static Throwable getOriginalException(RuntimeException e)
Unwind the wrapper (runtime) exception to extract the original- Parameters:
e
- Runtime exception (wrapper)- Returns:
- an original wrapped exception
-
throwIfFatal
public static void throwIfFatal(Throwable t)
Re-throw the specified exception if it is a fatal unrecoverable exception.- Parameters:
t
- the exception to check
-
-