示例#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();
        }
示例#2
0
        public void TestAutoNotifier()
        {
            try
            {
                throw new ApplicationException("Throwing an app extension.  You heartless bastard.");
            }
            catch (System.Exception ex)
            {
                BugSnag bs = new BugSnag()
                {
                    apiKey = "YOUR_API_KEY"
                };

                bs.Notify(ex, new
                {
                    OtherReallyCoolData = new
                    {
                        color = "Yellow",
                        mood  = "Mellow"
                    }
                });
            }
        }
示例#3
0
        public void TestAutoNotifier()
        {
            try
            {
                throw new ApplicationException("Throwing an app extension.  You heartless bastard.");
            }
            catch(System.Exception ex)
            {
                BugSnag bs = new BugSnag()
                {
                    apiKey = "YOUR_API_KEY"
                };

                bs.Notify(ex, new
                {
                    OtherReallyCoolData = new
                    {
                        color = "Yellow",
                        mood = "Mellow"
                    }
                });
            }
        }