Daniel's XL Toolbox NG
Bovender.ExceptionHandler.CentralHandler Class Reference

This static class implements central exception management. More...

Static Public Member Functions

static bool Manage (object origin, Exception e)
 Central exception managing method; can be called in try...catch statements of user entry points. More...
 
static void AppDomain_UnhandledException (object sender, UnhandledExceptionEventArgs e)
 Event handler for the AddDomain.CurrentDomain.UnhandledException event. More...
 
static bool Manage (object origin, Exception e)
 Central exception managing method; can be called in try...catch statements of user entry points. More...
 
static void AppDomain_UnhandledException (object sender, UnhandledExceptionEventArgs e)
 Event handler for the AddDomain.CurrentDomain.UnhandledException event. More...
 

Properties

static string DumpFile [get, set]
 Gets or sets the path of the dump file. By default, a file 'bovender-dump.txt' in the temporary directory will be used. More...
 

Events

static EventHandler< ManageExceptionEventArgsManageExceptionCallback
 

Detailed Description

This static class implements central exception management.

User entry points should try and catch exceptions which they may hand over to the Manage method. If an event handler is attached to the ManageExceptionCallback event, the event is raised. The event handler should display the exception to the user and set the event argument's ManageExceptionEventArgs.IsHandled property to true. If the Manage method does not find this property with a True value, it will throw an UnhandledException exception itself which will contain the original exception as inner exception.

Member Function Documentation

◆ AppDomain_UnhandledException() [1/2]

static void Bovender.ExceptionHandler.CentralHandler.AppDomain_UnhandledException ( object  sender,
UnhandledExceptionEventArgs  e 
)
inlinestatic

Event handler for the AddDomain.CurrentDomain.UnhandledException event.

◆ AppDomain_UnhandledException() [2/2]

static void Bovender.ExceptionHandler.CentralHandler.AppDomain_UnhandledException ( object  sender,
UnhandledExceptionEventArgs  e 
)
inlinestatic

Event handler for the AddDomain.CurrentDomain.UnhandledException event.

◆ Manage() [1/2]

static bool Bovender.ExceptionHandler.CentralHandler.Manage ( object  origin,
Exception  e 
)
inlinestatic

Central exception managing method; can be called in try...catch statements of user entry points.

Parameters
originObject where the exception occurred.
eException that occurred in origin.
Returns
True if central exception management was performed, false if not. If the exception was not managed, the calling method may want to rethrow the exception.

◆ Manage() [2/2]

static bool Bovender.ExceptionHandler.CentralHandler.Manage ( object  origin,
Exception  e 
)
inlinestatic

Central exception managing method; can be called in try...catch statements of user entry points.

Parameters
originObject where the exception occurred.
eException that occurred in origin.
Returns
True if central exception management was performed, false if not. If the exception was not managed, the calling method may want to rethrow the exception.

Property Documentation

◆ DumpFile

static string Bovender.ExceptionHandler.CentralHandler.DumpFile
staticgetset

Gets or sets the path of the dump file. By default, a file 'bovender-dump.txt' in the temporary directory will be used.

Event Documentation

◆ ManageExceptionCallback

static EventHandler< ManageExceptionEventArgs > Bovender.ExceptionHandler.CentralHandler.ManageExceptionCallback
static

The documentation for this class was generated from the following file: