Example #1
0
        /// <summary>
        /// Report an exception to Bugsnag with other per-request or per-session data
        /// </summary>
        /// <param name="ex">The exception to report</param>
        /// <param name="userId">An ID representing the current application's user.  If this isn't set
        /// this defaults to sessionId if available</param>
        /// <param name="context">The context that is currently active in the application</param>
        /// <param name="extraData">Data that will be sent as meta-data along with this error</param>
        public void Notify(System.Exception ex, string userId, string context, object extraData)
        {
            List <System.Exception> exList = new List <System.Exception>();

            exList.Add(ex);

            Notify(exList, userId, context, extraData);
        }
Example #2
0
        public void LogError(string message, System.Exception e)
        {
            //get logger
            ILog logger = LogManager.GetLogger(typeof(Outlook));

            //set user to log4net context, so we can use %X{user} in the appenders
            if (Username != string.Empty)
            {
                MDC.Set("username", Username);
            }

            if (logger.IsErrorEnabled)
            {
                logger.Error(message, e); //now log error
            }
        }
Example #3
0
 public InterfaceException(string message, System.Exception exception) :
     base(message, exception)
 {
 }
Example #4
0
 public UIException(string message, System.Exception exception) :
     base(message, exception)
 {
 }
Example #5
0
 public ServiceException(string message, System.Exception exception) :
     base(message, exception)
 {
 }
Example #6
0
 /// <summary>
 /// Report a single exception to BugSnag using defaults
 /// </summary>
 /// <param name="ex">The exception to report</param>
 /// <param name="extraData">Data that will be sent as meta-data along with this error</param>
 public void Notify(System.Exception ex, object extraData)
 {
     Notify(ex, string.Empty, string.Empty, extraData);
 }