Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/20/16 10:45:48 (8 years ago)
Author:
thasling
Message:

#2615:
re-enabled log in P2PMigrationAnalyzer
made code formatings

Location:
branches/thasling/DistributedGA/DistributedGA.Core/Implementation
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/thasling/DistributedGA/DistributedGA.Core/Implementation/PeerNetworkMessageHandler.cs

    r14253 r14261  
    5353        sender.Init(ownInstance, messageCacheCapacity);
    5454
    55       } catch (Exception ex) {
     55      }
     56      catch (Exception ex) {
    5657        AddError("PeerNetworkMessageHandler.Init", ex);
    5758      }
     
    6364        sender.Dispose();
    6465        peerListManager.Dispose();
    65       } catch (Exception ex) {
     66      }
     67      catch (Exception ex) {
    6668        AddError("PeerNetworkMessageHandler.Dispose", ex);
    6769      }
     
    7476          try {
    7577            sender.SendData(peer, data);
    76           } catch (Exception ex) {
     78          }
     79          catch (Exception ex) {
    7780            AddError("PeerNetworkMessageHandler.PublishDataToNetwork(during sending to one peer!)", ex);
    7881          }
    7982        }
    8083
    81       } catch (Exception ex) {
     84      }
     85      catch (Exception ex) {
    8286        AddError("PeerNetworkMessageHandler.PublishDataToNetwork", ex);
    8387      }
     
    103107        }
    104108        return res;//.ToArray();
    105       } catch (Exception ex) {
     109      }
     110      catch (Exception ex) {
    106111        AddError("PeerNetworkMessageHandler.GetDataFromNetwork", ex);
    107112        return null;
     
    133138          .Select(ip => ip.ToString())
    134139          .First(str => str.StartsWith(ipPrefix));
    135       } catch { return null; }
     140      }
     141      catch { return null; }
    136142    }
    137143
     
    147153    private void AddError(string source, Exception ex) {
    148154      PropagateException(ex);
    149       if (peerListManager != null) {
    150         try {
    151           peerListManager.SendLogToServer(string.Concat("Source: ", source, ", Exception: ", ex.Message));
    152         } catch { }
    153       }
    154155    }
     156
    155157  }
    156158}
  • branches/thasling/DistributedGA/DistributedGA.Core/Implementation/WcfMessageSender.cs

    r14253 r14261  
    7676
    7777          Task.WaitAll(runningTasks.ToArray());
    78         } finally {
     78        }
     79        finally {
    7980          isActive = false;
    8081        }
     
    129130          }
    130131        }
    131       } catch (Exception ex) {
     132      }
     133      catch (Exception ex) {
    132134        //ignore
    133135        Console.WriteLine(ex.Message);
  • branches/thasling/DistributedGA/DistributedGA.Core/Implementation/WcfPeerListManager.cs

    r14253 r14261  
    4141    public List<PeerInfo> GetPeerList() {
    4242      return cachedPeerList;
    43     }
    44 
    45     public void SendLogToServer(string msg) {
    46       var binding = new NetTcpBinding();
    47       var endpoint = new EndpointAddress(serverString);
    48       using (var myChannelFactory = new ChannelFactory<IContactService>(binding, endpoint)) {
    49         using (IClientChannel client = (IClientChannel)myChannelFactory.CreateChannel()) {
    50           ((IContactService)client).MakeLog(myself, msg);
    51         }
    52       }
    5343    }
    5444
Note: See TracChangeset for help on using the changeset viewer.