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

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

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

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

            _configuration = configuration;
        }
예제 #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();
        }
예제 #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();
        }
예제 #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();
        }
예제 #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();
        }
예제 #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());
        }
예제 #10
0
        public static void registerHandler(ExceptionHandlerConfiguration configuration)
        {
            setConfiguration(configuration);

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

            Application.ThreadException += threadExceptionEventHandler;
        }