Ejemplo n.º 1
0
        public static void setConfiguration(ExceptionHandlerConfiguration configuration)
        {
            if (configuration == null)
                configuration = new ExceptionHandlerConfiguration();

            _configuration = configuration;
        }
Ejemplo n.º 2
0
        protected ExceptionHandler()
        {
            InitializeComponent();

            if (_configuration == null)
                _configuration = new ExceptionHandlerConfiguration();
        }
Ejemplo n.º 3
0
        protected ExceptionHandler()
        {
            InitializeComponent();

            if (_configuration == null)
            {
                _configuration = new ExceptionHandlerConfiguration();
            }
        }
Ejemplo n.º 4
0
        public static void setConfiguration(ExceptionHandlerConfiguration configuration)
        {
            if (configuration == null)
            {
                configuration = new ExceptionHandlerConfiguration();
            }

            _configuration = configuration;
        }
Ejemplo n.º 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();
        }
Ejemplo n.º 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();
        }
Ejemplo n.º 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();
        }
Ejemplo n.º 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();
        }
Ejemplo n.º 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());
        }
Ejemplo n.º 10
0
        public static void registerHandler(ExceptionHandlerConfiguration configuration)
        {
            setConfiguration(configuration);

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

            Application.ThreadException += threadExceptionEventHandler;
        }