Пример #1
0
 private static bool handleNullReferenceException(Exception ex, MethodBase Method)
 {
     Logging.Logger("ERROR:  MethodName=" + Method.Name + "  Type: " + ex.GetType().Name + "  #:" + ex.HResult + "  Message:" + ex.Message);
     if (ServerInfo.ServerPinging)
     {
         PromptUser("ERROR:  MethodName=" + Method.Name + "  Type: " + ex.GetType().Name + "  #:" + ex.HResult + "  Message:" + ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Exclamation, "ERROR");
         OtherFunctions.EndProgram(true);
         return(false);
     }
     else
     {
         return(true);
     }
 }
Пример #2
0
 private static void UnHandledError(Exception ex, int ErrorCode, MethodBase Method)
 {
     Logging.Logger("UNHANDLED ERROR:  MethodName=" + Method.Name + "  Type: " + ex.GetType().Name + "  #:" + ErrorCode + "  Message:" + ex.Message);
     PromptUser("UNHANDLED ERROR:  MethodName=" + Method.Name + "  Type: " + ex.GetType().Name + "  #:" + ErrorCode + "  Message:" + ex.Message + Environment.NewLine + Environment.NewLine + "file://" + Paths.LogPath, MessageBoxButtons.OK, MessageBoxIcon.Error, "ERROR");
     OtherFunctions.EndProgram(true);
 }