/// <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); }
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 } }
public InterfaceException(string message, System.Exception exception) : base(message, exception) { }
public UIException(string message, System.Exception exception) : base(message, exception) { }
public ServiceException(string message, System.Exception exception) : base(message, exception) { }
/// <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); }