Class AmazonServiceException
A base exception for some Amazon Web Services.
Most exceptions thrown to client code will be service-specific exceptions, though some services may throw this exception if there is a problem which is caught in the core client code.
public class AmazonServiceException : Exception, ISerializable
- Inheritance
-
AmazonServiceException
- Implements
- Derived
- Inherited Members
Constructors
AmazonServiceException()
public AmazonServiceException()
AmazonServiceException(Exception)
public AmazonServiceException(Exception innerException)
Parameters
innerException
Exception
AmazonServiceException(SerializationInfo, StreamingContext)
Constructs a new instance of the AmazonServiceException class with serialized data.
protected AmazonServiceException(SerializationInfo info, StreamingContext context)
Parameters
info
SerializationInfoThe SerializationInfo that holds the serialized object data about the exception being thrown.
context
StreamingContextThe StreamingContext that contains contextual information about the source or destination.
Exceptions
- ArgumentNullException
The
info
parameter is null.- SerializationException
The class name is null or HResult is zero (0).
AmazonServiceException(string)
public AmazonServiceException(string message)
Parameters
message
string
AmazonServiceException(string, ErrorType, string, string, HttpStatusCode)
public AmazonServiceException(string message, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode)
Parameters
message
stringerrorType
ErrorTypeerrorCode
stringrequestId
stringstatusCode
HttpStatusCode
AmazonServiceException(string, Exception)
public AmazonServiceException(string message, Exception innerException)
Parameters
AmazonServiceException(string, Exception, ErrorType, string, string, HttpStatusCode)
public AmazonServiceException(string message, Exception innerException, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode)
Parameters
message
stringinnerException
ExceptionerrorType
ErrorTypeerrorCode
stringrequestId
stringstatusCode
HttpStatusCode
AmazonServiceException(string, Exception, HttpStatusCode)
public AmazonServiceException(string message, Exception innerException, HttpStatusCode statusCode)
Parameters
message
stringinnerException
ExceptionstatusCode
HttpStatusCode
Properties
ErrorCode
The error code returned by the service
public string ErrorCode { get; set; }
Property Value
ErrorType
Whether the error was attributable to Sender
or Reciever
.
public ErrorType ErrorType { get; set; }
Property Value
RequestId
The id of the request which generated the exception.
public string RequestId { get; set; }
Property Value
Retryable
Flag indicating if the exception is retryable and the associated retry details. A null value indicates that the exception is not retryable.
public virtual RetryableDetails Retryable { get; }
Property Value
StatusCode
The HTTP status code from the service response
public HttpStatusCode StatusCode { get; set; }
Property Value
Methods
GetObjectData(SerializationInfo, StreamingContext)
Sets the SerializationInfo with information about the exception.
[SecurityCritical]
public override void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
info
SerializationInfoThe SerializationInfo that holds the serialized object data about the exception being thrown.
context
StreamingContextThe StreamingContext that contains contextual information about the source or destination.
Exceptions
- ArgumentNullException
The
info
parameter is a null reference (Nothing in Visual Basic).