public static void setConfiguration(ExceptionHandlerConfiguration configuration) { if (configuration == null) configuration = new ExceptionHandlerConfiguration(); _configuration = configuration; }
protected ExceptionHandler() { InitializeComponent(); if (_configuration == null) _configuration = new ExceptionHandlerConfiguration(); }
protected ExceptionHandler() { InitializeComponent(); if (_configuration == null) { _configuration = new ExceptionHandlerConfiguration(); } }
public static void setConfiguration(ExceptionHandlerConfiguration configuration) { if (configuration == null) { configuration = new ExceptionHandlerConfiguration(); } _configuration = configuration; }
public static void threadExceptionEventHandler(object sender, ThreadExceptionEventArgs e) { if (_configuration == null) _configuration = new ExceptionHandlerConfiguration(); ExceptionHandler handler = new ExceptionHandler(); handler.isRecoverable = true; handler.setupDialog(sender, e.Exception); handler.ShowDialog(); }
public static void currentDomainUnhandledExceptionHandler(object sender, UnhandledExceptionEventArgs e) { if (_configuration == null) _configuration = new ExceptionHandlerConfiguration(); ExceptionHandler handler = new ExceptionHandler(); handler.isRecoverable = false; handler.setupDialog(sender, (Exception) e.ExceptionObject); handler.ShowDialog(); }
public static void currentDomainUnhandledExceptionHandler(object sender, UnhandledExceptionEventArgs e) { if (_configuration == null) { _configuration = new ExceptionHandlerConfiguration(); } ExceptionHandler handler = new ExceptionHandler(); handler.isRecoverable = false; handler.setupDialog(sender, (Exception)e.ExceptionObject); handler.ShowDialog(); }
public static void threadExceptionEventHandler(object sender, ThreadExceptionEventArgs e) { if (_configuration == null) { _configuration = new ExceptionHandlerConfiguration(); } ExceptionHandler handler = new ExceptionHandler(); handler.isRecoverable = true; handler.setupDialog(sender, e.Exception); handler.ShowDialog(); }
static void Main() { ExceptionHandlerConfiguration ehc = new ExceptionHandlerConfiguration(); ehc.gitHubRepository = "stwalkerster/solar-uploader"; ehc.contactEmailAddress = "*****@*****.**"; ehc.showTechnicalInformation = true; ehc.bugTracker = "https://github.com/stwalkerster/solar-uploader/issues"; ExceptionHandler.setConfiguration(ehc); Application.ThreadException += ExceptionHandler.threadExceptionEventHandler; AppDomain.CurrentDomain.UnhandledException += ExceptionHandler.currentDomainUnhandledExceptionHandler; Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Form1()); }
public static void registerHandler(ExceptionHandlerConfiguration configuration) { setConfiguration(configuration); Application.ThreadException += threadExceptionEventHandler; }
public static void registerHandler(ExceptionHandlerConfiguration configuration) { setConfiguration(configuration); Application.ThreadException += threadExceptionEventHandler; }