Class UncheckedException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
jodd.exception.UncheckedException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
BeanException, TypeConversionException
Unchecked exception and also a wrapper for checked exceptions.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionUncheckedException(String message) UncheckedException(String message, Throwable t) UncheckedException(String message, Throwable t, boolean showCauseDetails) UncheckedException(Throwable t, boolean showCauseDetails) -
Method Summary
Modifier and TypeMethodDescriptionstatic <V> VcallAndWrapException(Callable<V> callable) Wraps checked exceptions in aUncheckedException.getCause()Returns exception cause.Returns the detail message, including the message from the nested exception if there is one.voidvoidvoidvoidrethrow()Re-throws cause if exists.static voidWraps checked exceptions in aUncheckedException.static RuntimeExceptionWraps all exceptions in aUncheckedExceptionstatic RuntimeExceptionWraps all exceptions in aUncheckedExceptionMethods inherited from class Throwable
addSuppressed, fillInStackTrace, getLocalizedMessage, getStackTrace, getSuppressed, initCause, setStackTrace, toString
-
Field Details
-
cause
-
CAUSE_DIV
-
showCauseDetails
protected final boolean showCauseDetailsIf set totruestack trace will be enhanced with cause's stack traces.
-
-
Constructor Details
-
UncheckedException
-
UncheckedException
-
UncheckedException
public UncheckedException() -
UncheckedException
-
UncheckedException
-
UncheckedException
-
-
Method Details
-
printStackTrace
public void printStackTrace()- Overrides:
printStackTracein classThrowable
-
printStackTrace
- Overrides:
printStackTracein classThrowable
-
printStackTrace
- Overrides:
printStackTracein classThrowable
-
getMessage
Returns the detail message, including the message from the nested exception if there is one.- Overrides:
getMessagein classThrowable
-
callAndWrapException
Wraps checked exceptions in aUncheckedException. Unchecked exceptions are not wrapped. -
runAndWrapException
Wraps checked exceptions in aUncheckedException. Unchecked exceptions are not wrapped. -
wrap
Wraps all exceptions in aUncheckedException -
wrap
Wraps all exceptions in aUncheckedException -
rethrow
-
getCause
-