Package io.fabric8.mockwebserver
Class MockServerException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- io.fabric8.mockwebserver.MockServerException
-
- All Implemented Interfaces:
Serializable
public class MockServerException extends RuntimeException
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MockServerException(String message)MockServerException(String message, Throwable cause)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static RuntimeExceptionlaunderThrowable(String message, Throwable cause)Wraps the providedThrowablein a MockServerException in case it's checked exception.static RuntimeExceptionlaunderThrowable(Throwable cause)Wraps the providedThrowablein a MockServerException in case it's checked exception.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Method Detail
-
launderThrowable
public static RuntimeException launderThrowable(Throwable cause)
Wraps the providedThrowablein a MockServerException in case it's checked exception.For RuntimeException instances, the original exception is returned.
- Parameters:
cause- Throwable to wrap.- Returns:
- the original exception in case it's unchecked, or a MockServerException wrapping it.
-
launderThrowable
public static RuntimeException launderThrowable(String message, Throwable cause)
Wraps the providedThrowablein a MockServerException in case it's checked exception.For RuntimeException instances, the original exception is returned.
- Parameters:
message- Message to use for the exception.cause- Throwable to wrap.- Returns:
- the original exception in case it's unchecked, or a MockServerException wrapping it.
-
-