Exemplo n.º 1
0
        /// <summary>
        /// Hooks up bugsense error sender to the unhandled exception handler. This will cause crashes to be sent
        /// to bugsense when they occur. This overload is used when customizing the crash report destination. For normal
        /// use - Use the other Init method.
        /// </summary>
        /// <param name="apiKey">This is the API key for bugsense. You need to get *your own* API key from http://bugsense.com/ </param>
        /// <param name="version">The version of this application to send in case of a crash. The default value is zero, in this case the version of the entry assebmly will be used. See Assembly.GetEntryAssembly()</param>
        /// <param name="apiUrl">The Url to send the crashes to, only use this if you need to customize the destination</param>
        public static void Init(string apiKey, string version = null, string apiUrl = BugsenseApiUrl)
        {
            _errorSender = new ErrorSender(apiKey, apiUrl);
            _informationCollector = new CrashInformationCollector(version);

            AttachHandler();
        }
Exemplo n.º 2
0
        /// <summary>
        /// Hooks up bugsense error sender to the unhandled exception handler. This will cause crashes to be sent
        /// to bugsense when they occur. This overload is used when customizing the crash report destination. For normal
        /// use - Use the other Init method.
        /// </summary>
        /// <param name="apiKey">This is the API key for bugsense. You need to get *your own* API key from http://bugsense.com/ </param>
        /// <param name="version">The version of this application to send in case of a crash. The default value is zero, in this case the version of the entry assebmly will be used. See Assembly.GetEntryAssembly()</param>
        /// <param name="apiUrl">The Url to send the crashes to, only use this if you need to customize the destination</param>
        public static void Init(string apiKey, string version = null, string apiUrl = BugsenseApiUrl)
        {
            _errorSender = new ErrorSender(apiKey, new Uri(apiUrl), new WebRequestCreator());
            _informationCollector = new CrashInformationCollector(new AssemblyRepository(), version);

            AttachHandler();
        }
Exemplo n.º 3
0
        /// <summary>
        /// Catches exceptions on the UI thread
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public static void OnThreadException(object sender, ThreadExceptionEventArgs e)
        {
            if (e.Exception != null)
            {
                var ui = new ErrorSender()
                {
                    CurrentException = e.Exception
                };

                ui.Show();
            }
        }
 private void SendOrStore(Exception ex)
 {
     var errorSender = new ErrorSender(null, _uri, _webRequestCreator);
     errorSender.SendOrStore(new CrashInformationCollector(assemblyRepository, null).CreateCrashReport(ex));
 }
Exemplo n.º 5
0
        private void SendOrStore(Exception ex)
        {
            var errorSender = new ErrorSender(null, _uri, _webRequestCreator);

            errorSender.SendOrStore(new CrashInformationCollector(assemblyRepository, null).CreateCrashReport(ex));
        }