Package io.github.jonloucks.variants.api
Class VariantException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.github.jonloucks.variants.api.VariantException
- All Implemented Interfaces:
Serializable
Runtime exception thrown for Variants related problems.
For example, when Variants fails to initialize.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionVariantException(String message) Passthrough forRuntimeException(String)VariantException(String message, Throwable thrown) Passthrough forRuntimeException(String, Throwable) -
Method Summary
Modifier and TypeMethodDescriptionstatic VariantExceptionRethrows a caught exception or a VariantException if uncheckedMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
VariantException
Passthrough forRuntimeException(String)- Parameters:
message- the message for this exception
-
VariantException
Passthrough forRuntimeException(String, Throwable)- Parameters:
message- the message for this exceptionthrown- the cause of this exception, null is allowed
-
-
Method Details
-
rethrow
Rethrows a caught exception or a VariantException if unchecked- Parameters:
thrown- the previously caught exception- Returns:
- Possibly a new VariantException which should be rethrown
- Throws:
Error- iif original thrown is an errorRuntimeException- when thrown is a RuntimeExceptionVariantException- if thrown is a checked exception
-