/// <summary> /// Process an unhandled exception. /// </summary> /// <param name="ex">The exception</param> /// <param name="submissionMethod">The method that was used to collect the error.</param> /// <param name="includeDefaultInformation">Whether to add the default information to the case or not</param> /// <param name="contextData">Any additional contextual data that should be used during creation of the error information.</param> public void ProcessUnhandledException(Exception ex, string submissionMethod, bool includeDefaultInformation = true, IDictionary <string, object> contextData = null) { Error error = CreateError(ex, addDefaultInformation: includeDefaultInformation, submissionMethod: submissionMethod, contextData: contextData); Log.FormattedInfo(typeof(ExceptionlessClient), "Processing unhandled exception of type '{0}'...", ex.GetType().FullName); var args = new UnhandledExceptionReportingEventArgs(ex, error); OnUnhandledExceptionReporting(args); if (args.Cancel) { return; } if (args.ShouldShowUI) { IExceptionlessPlugin uiPlugin = Plugins.FirstOrDefault(p => p.SupportsShowingUnhandledErrorSubmissionUI); if (uiPlugin != null) { if (!uiPlugin.ShowUnhandledErrorSubmissionUI(new ExceptionlessPluginContext(this, contextData), error)) { return; } } } SubmitError(error); }
public void RegisterPlugin(IExceptionlessPlugin plugin) { if (plugin == null) { return; } RegisterPlugin(plugin.GetType().FullName, plugin); }
public void RegisterPlugin(string key, IExceptionlessPlugin plugin) { if (_plugins.ContainsKey(key)) { _plugins[key] = plugin; } else { _plugins.Add(key, plugin); } }
public void UnregisterPlugin(IExceptionlessPlugin plugin) { UnregisterPlugin(plugin.GetType().FullName); }
public void RegisterPlugin(string key, IExceptionlessPlugin plugin) { if (_plugins.ContainsKey(key)) _plugins[key] = plugin; else _plugins.Add(key, plugin); }
public void RegisterPlugin(IExceptionlessPlugin plugin) { if (plugin == null) return; RegisterPlugin(plugin.GetType().FullName, plugin); }
public void UnregisterPlugin(IExceptionlessPlugin plugin) { UnregisterPlugin(plugin.GetType().FullName); }