コード例 #1
0
 public static void Raise(string format, params object[] paramInfo)
 {
     try
       {
     InternalErrorEvent event1 = new InternalErrorEvent();
     event1.Properties.Add("Parameters", ComposeMessageString(format, paramInfo));
     event1.Sign();
       }
       catch (Exception exception1)
       {
     ReportException(exception1);
       }
 }
コード例 #2
0
 public static void Raise(string message)
 {
     try
       {
     InternalErrorEvent event1 = new InternalErrorEvent();
     event1.m_Message = message;
     event1.Sign();
       }
       catch (Exception exception1)
       {
     ReportException(exception1);
       }
 }
コード例 #3
0
 public static void Publish(Exception ex, params object[] publishParams)
 {
     try
       {
     BaseEvent event1 = null;
     BaseApplicationException exception1 = ex as BaseApplicationException;
     if (((exception1 == null) || !exception1.PublishAs.IsSubclassOf(typeof (BaseEvent))) ||
     exception1.PublishAs.IsAbstract)
     {
       event1 = new InternalErrorEvent();
     }
     else
     {
       event1 = (BaseEvent) Activator.CreateInstance(exception1.PublishAs);
     }
     event1.Properties.Remove("StackTrace");
     event1.Properties.Add("StackTraceString", ex.StackTrace);
     if (m_UseFullMessage)
     {
       event1.Message = ex.ToString();
     }
     else
     {
       event1.Message = ex.Message;
     }
     if (exception1 != null)
     {
       if (!exception1.DisableMethodInfo)
       {
     event1.Message = event1.Message + string.Format(" ['{0}']", event1.CallingMethod.ToString());
       }
       exception1.AdjustEvent(event1, publishParams);
     }
     event1.Sign();
       }
       catch (Exception exception2)
       {
     InternalErrorEvent.Raise("Cannot publish Exception: {0}", new object[] {exception2.ToString()});
       }
 }