internal static Exception ConvertToIoTHubException(Exception exception, AmqpObject source)
        {
            Exception e = ConvertToIoTHubException(exception);

            if (source.IsClosing() && (e is InvalidOperationException || e is OperationCanceledException))
            {
                return(new IotHubCommunicationException("Amqp resource is disconnected."));
            }
            else
            {
                return(e);
            }
        }
Esempio n. 2
0
        internal static Exception ConvertToIoTHubException(Exception exception, AmqpObject source)
        {
            Exception e = ConvertToIoTHubException(exception);

            if (source.IsClosing() && (e is InvalidOperationException || e is OperationCanceledException))
            {
                return(RESOUCE_DISCONNECTED_EXCEPTION);
            }
            else
            {
                return(e);
            }
        }