Class SdkException
- java.lang.Object
- 
- java.lang.Throwable
- 
- java.lang.Exception
- 
- java.lang.RuntimeException
- 
- software.amazon.awssdk.core.exception.SdkException
 
 
 
 
- 
- All Implemented Interfaces:
- Serializable
 - Direct Known Subclasses:
- SdkClientException,- SdkServiceException
 
 public class SdkException extends RuntimeException Base class for SDK-specific exceptions. Note that network operations may throw UncheckedIOException or propagate other RuntimeExceptions directly rather than wrapping them in SdkException.- See Also:
- SdkServiceException,- SdkClientException, Serialized Form
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static interfaceSdkException.Builderprotected static classSdkException.BuilderImpl
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedSdkException(SdkException.Builder builder)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SdkException.Builderbuilder()static SdkExceptioncreate(String message, Throwable cause)IntegernumAttempts()Returns the number of attempts made before this exception was thrown.StringrawMessage()Returns the raw message of this exception without any additional formatting.booleanretryable()Specifies whether or not an exception can be expected to succeed on a retry.SdkException.BuildertoBuilder()Create aSdkException.Builderinitialized with the properties of thisSdkException.- 
Methods inherited from class java.lang.ThrowableaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
- 
 
- 
- 
- 
Constructor Detail- 
SdkExceptionprotected SdkException(SdkException.Builder builder) 
 
- 
 - 
Method Detail- 
numAttemptspublic Integer numAttempts() Returns the number of attempts made before this exception was thrown. This includes the initial attempt and any retries.- Returns:
- The number of attempts made, or null if not set
 
 - 
rawMessagepublic String rawMessage() Returns the raw message of this exception without any additional formatting. This is used internally to construct the complete exception message.- Returns:
- The raw exception message
 
 - 
createpublic static SdkException create(String message, Throwable cause) 
 - 
retryablepublic boolean retryable() Specifies whether or not an exception can be expected to succeed on a retry.
 - 
toBuilderpublic SdkException.Builder toBuilder() Create aSdkException.Builderinitialized with the properties of thisSdkException.- Returns:
- A new builder initialized with this config's properties.
 
 - 
builderpublic static SdkException.Builder builder() - Returns:
- SdkException.Builderinstance to construct a new- SdkException.
 
 
- 
 
-