public static AmqpException FromError(Microsoft.ServiceBus.Messaging.Amqp.Framing.Error error)
 {
     if (error == null || error.Condition.Value == null)
     {
         return(null);
     }
     if (error.Description != null)
     {
         return(new AmqpException(error, error.Description));
     }
     return(new AmqpException(AmqpError.GetError(error.Condition)));
 }
Example #2
0
        public static AmqpException FromError(Error error)
        {
            if (error == null || error.Condition.Value == null)
            {
                return(null);
            }

            if (error.Description == null)
            {
                Error amqpError = AmqpError.GetError(error.Condition);
                return(new AmqpException(amqpError));
            }
            else
            {
                return(new AmqpException(error, error.Description));
            }
        }