Exemplo n.º 1
0
 private void SafeInvoke(GameSocketMessageHandler handler, Habbo sender, IncomingMessage message)
 {
     try
     {
         handler(sender, message);
     }
     catch (Exception e)
     {
         sender.Socket.Disconnect("Unhandled Exception in packet handler");
         string dumpPath = CoreManager.ServerCore.DumpException(e);
         CoreManager.ServerCore.ConsoleManager.Error("Event Handler", "An unhandled exception from a packet handler has been caught and the socket has been closed!");
         CoreManager.ServerCore.ConsoleManager.Error("Event Handler", "    An exception dump has been saved to " + dumpPath);
     }
 }
Exemplo n.º 2
0
 private void SafeInvoke(GameSocketMessageHandler handler, Habbo sender, IncomingMessage message)
 {
     try
     {
         handler(sender, message);
     }
     catch (Exception e)
     {
         sender.Socket.Disconnect("Unhandled Exception in packet handler");
         string dumpPath = CoreManager.ServerCore.DumpException(e);
         CoreManager.ServerCore.ConsoleManager.Error("Event Handler", "An unhandled exception from a packet handler has been caught and the socket has been closed!");
         CoreManager.ServerCore.ConsoleManager.Error("Event Handler", "    An exception dump has been saved to " + dumpPath);
     }
 }