コード例 #1
0
ファイル: ConnectionFactory.cs プロジェクト: wandec/ice
        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
ファイル: ConnectionFactory.cs プロジェクト: wandec/ice
        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}");
                }
            }
        }