Class MockServerException

    • Constructor Detail

      • MockServerException

        public MockServerException​(String message)
      • MockServerException

        public MockServerException​(String message,
                                   Throwable cause)
    • Method Detail

      • launderThrowable

        public static RuntimeException launderThrowable​(Throwable cause)
        Wraps the provided Throwable in 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 provided Throwable in 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.