public ErrorReporter() { s_instance = this; _listener = new CircularBufferTraceListener(); Trace.Listeners.Clear(); Trace.Listeners.Add(_listener); try { _bugsnagClient = new Client(Bugsnag.ConfigurationSection.Configuration.Settings); _bugsnagClient.BeforeNotify(new Middleware(OnBeforeNotify)); } catch (Exception ex) { Trace.WriteLine(ex); } }
public ErrorReporter(AppSettings settings) { Debug.Assert(s_instance == null); s_instance = this; _listener = new CircularBufferTraceListener(); _settings = settings; Trace.Listeners.Clear(); Trace.Listeners.Add(_listener); if (_settings.IsTelemetryEnabled) { try { _bugsnagClient = new Client(Bugsnag.ConfigurationSection.Configuration.Settings); _bugsnagClient.BeforeNotify(new Middleware(OnBeforeNotify)); } catch (Exception ex) { Trace.WriteLine($"ErrorReporter .ctor Failed: {ex}"); } } }