Amazon.CloudTrail.Model.Internal.MarshallTransformations.StartLoggingResponseUnmarshaller.UnmarshallException C# (CSharp) Метод

UnmarshallException() публичный Метод

public UnmarshallException ( JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode ) : AmazonServiceException
context Amazon.Runtime.Internal.Transform.JsonUnmarshallerContext
innerException System.Exception
statusCode HttpStatusCode
Результат Amazon.Runtime.AmazonServiceException
        public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
        {
          ErrorResponse errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);                    
          
          if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidTrailNameException"))
          {
            return new InvalidTrailNameException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
          }
  
          if (errorResponse.Code != null && errorResponse.Code.Equals("TrailNotFoundException"))
          {
            return new TrailNotFoundException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
          }
  
          return new AmazonCloudTrailException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
        }