Example #1
0
        public static void setConfiguration(ExceptionHandlerConfiguration configuration)
        {
            if (configuration == null)
                configuration = new ExceptionHandlerConfiguration();

            _configuration = configuration;
        }
Example #2
0
        protected ExceptionHandler()
        {
            InitializeComponent();

            if (_configuration == null)
                _configuration = new ExceptionHandlerConfiguration();
        }
Example #3
0
        protected ExceptionHandler()
        {
            InitializeComponent();

            if (_configuration == null)
            {
                _configuration = new ExceptionHandlerConfiguration();
            }
        }
Example #4
0
        public static void setConfiguration(ExceptionHandlerConfiguration configuration)
        {
            if (configuration == null)
            {
                configuration = new ExceptionHandlerConfiguration();
            }

            _configuration = configuration;
        }
Example #5
0
        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();
        }
Example #6
0
        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();
        }
Example #7
0
        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();
        }
Example #8
0
        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();
        }
Example #9
0
        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());
        }
Example #10
0
        public static void registerHandler(ExceptionHandlerConfiguration configuration)
        {
            setConfiguration(configuration);

            Application.ThreadException += threadExceptionEventHandler;
        }
Example #11
0
        public static void registerHandler(ExceptionHandlerConfiguration configuration)
        {
            setConfiguration(configuration);

            Application.ThreadException += threadExceptionEventHandler;
        }