private static void CallWithErrorHandling <TRet>(EcoCommandFunction toCall, User user, params string[] args)
 {
     try
     {
         toCall(user, args);
     }
     catch (Exception e)
     {
         ChatManager.ServerMessageToPlayer(new LocString("Error occurred while attempting to run that command. Error message: " + e), user);
         Logger.Error("An error occurred while attempting to execute an Eco command. Error message: " + e);
     }
 }
示例#2
0
 private static void CallWithErrorHandling <TRet>(EcoCommandFunction toCall, User user, params int[] args)
 {
     try
     {
         toCall(user, args);
     }
     catch (Exception e)
     {
         ChatManager.ServerMessageToPlayer(Localizer.Format("Error occurred while attempting to run that command. Error message: {0}", e), user);
         Console.WriteLine(Localizer.Format("Error occurred while attempting to run that command. Error message: {0}", e));
     }
 }
示例#3
0
 private static void CallWithErrorHandling <TRet>(EcoCommandFunction toCall, User user, params string[] args)
 {
     try
     {
         toCall(user, args);
     }
     catch (Exception e)
     {
         ChatManager.ServerMessageToPlayer("Error occurred while attempting to run that command. Error message: " + e, user, false);
         Log("Error occurred while attempting to run that command. Error message: " + e);
         Log(e.StackTrace);
     }
 }