Package dev.dbos.transact.spring
Class WrappedThrowableException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
dev.dbos.transact.spring.WrappedThrowableException
- All Implemented Interfaces:
Serializable
A RuntimeException wrapper used to pass non-Exception Throwables (typically Errors) through
ThrowingSupplier interfaces that are constrained to Exception types.
This is an internal implementation detail used by DBOSAspect to handle the mismatch between AspectJ's ProceedingJoinPoint.proceed() which can throw any Throwable, and DBOS's ThrowingSupplier which only accepts Exception types.
The wrapped Throwable should be extracted and rethrown to preserve original error semantics.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionWrappedThrowableException(Throwable wrappedThrowable) Wraps a non-Exception Throwable (typically an Error) so it can be passed through Exception-constrained interfaces. -
Method Summary
Modifier and TypeMethodDescriptionGets the original wrapped Throwable.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
WrappedThrowableException
Wraps a non-Exception Throwable (typically an Error) so it can be passed through Exception-constrained interfaces.- Parameters:
wrappedThrowable- the original Throwable to wrap, must not be an Exception
-
-
Method Details
-
getWrappedThrowable
Gets the original wrapped Throwable.- Returns:
- the original Throwable that was wrapped
-