Class ThrowableUtils
java.lang.Object
software.amazon.awssdk.core.internal.util.ThrowableUtils
Utility for use with errors or exceptions.
-
Method Summary
Modifier and TypeMethodDescriptionstatic SdkException
Wraps the givenThrowable
inSdkException
if necessary.static RuntimeException
Used to help perform common throw-up with minimal wrapping.static RuntimeException
Same asfailure(Throwable)
, but the given errmsg will be used if it was wrapped as either anSdkClientException
orAbortedException
.static Throwable
getRootCause
(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 anSdkClientException
orAbortedException
. -
asSdkException
Wraps the givenThrowable
inSdkException
if necessary.
-