Bugsnag.Library.BugSnag.Notify C# (CSharp) Метод

Notify() публичный Метод

Report a list of exceptions to Bugsnag with other per-request or per-session data
public Notify ( List exList, string userId, string context, object extraData ) : void
exList List The list of exceptions to report
userId string An ID representing the current application's user. If this isn't set /// this defaults to sessionId if available
context string The context that is currently active in the application
extraData object Data that will be sent as meta-data along with every error
Результат void
        public void Notify(List<System.Exception> exList, string userId, string context, object extraData)
        {
            //  Add an event for this exception list:
            List<Event> events = new List<Event>();
            events.Add(ProcessExceptions(exList, context, userId, extraData));

            //  Send the notification:
            ErrorNotification notification = new ErrorNotification()
            {
                Api_Key = this.apiKey,
                Events = events
            };

            SendNotification(notification, this.useSSL);
        }

Same methods

BugSnag::Notify ( ) : void
BugSnag::Notify ( List exList, object extraData ) : void
BugSnag::Notify ( System ex, object extraData ) : void
BugSnag::Notify ( System ex, string userId, string context, object extraData ) : void
BugSnag::Notify ( object extraData ) : void

Usage Example

Пример #1
0
        //  Added for the BugSnag sample web application
        protected void Application_Error(object sender, EventArgs e)
        {
            //  Create a new BugSnag notifier
            BugSnag bs = new BugSnag();

            //  Notify.  This will get configuration from the web.config
            //  and gather all known errors and report them.  It's just that simple!
            bs.Notify();
        }