Пример #1
0
        internal void HandleException(System.Exception ex, bool hasMore)
        {
            TraceLevels traceLevels = _communicator.TraceLevels;

            if (traceLevels.Network >= 2)
            {
                if (ex is CommunicatorDestroyedException)
                {
                    _communicator.Logger.Trace(traceLevels.NetworkCat, $"couldn't resolve endpoint host\n{ex}");
                }
                else if (hasMore)
                {
                    _communicator.Logger.Trace(traceLevels.NetworkCat,
                                               $"couldn't resolve endpoint host, trying next endpoint\n{ex}");
                }
                else
                {
                    _communicator.Logger.Trace(traceLevels.NetworkCat,
                                               $"couldn't resolve endpoint host and no more endpoints to try\n{ex}");
                }
            }
        }
Пример #2
0
        private void HandleConnectionException(System.Exception ex, bool hasMore)
        {
            TraceLevels traceLevels = _communicator.TraceLevels;

            if (traceLevels.Network >= 2)
            {
                if (ex is CommunicatorDestroyedException)
                {
                    _communicator.Logger.Trace(traceLevels.NetworkCat, $"connection to endpoint failed\n{ex}");
                }
                else if (hasMore)
                {
                    _communicator.Logger.Trace(traceLevels.NetworkCat,
                                               $"connection to endpoint failed, trying next endpoint\n{ex}");
                }
                else
                {
                    _communicator.Logger.Trace(traceLevels.NetworkCat,
                                               $"connection to endpoint failed and no more endpoints to try\n{ex}");
                }
            }
        }