Class ThrowableUtils
java.lang.Object
software.amazon.awssdk.core.internal.util.ThrowableUtils
Utility for use with errors or exceptions.
-
Method Summary
Modifier and TypeMethodDescriptionstatic SdkExceptionWraps the givenThrowableinSdkExceptionif necessary.static RuntimeExceptionUsed to help perform common throw-up with minimal wrapping.static RuntimeExceptionSame asfailure(Throwable), but the given errmsg will be used if it was wrapped as either anSdkClientExceptionorAbortedException.static ThrowablegetRootCause(Throwable orig) Returns the root cause of the given cause, or null if the given cause is null.
-
Method Details
-
getRootCause
Returns the root cause of the given cause, or null if the given cause is null. If the root cause is over 1000 level deep, the original cause will be returned defensively as this is heuristically considered a circular reference, however unlikely. -
failure
Used to help perform common throw-up with minimal wrapping. -
failure
Same asfailure(Throwable), but the given errmsg will be used if it was wrapped as either anSdkClientExceptionorAbortedException. -
asSdkException
Wraps the givenThrowableinSdkExceptionif necessary.
-