Show / Hide Table of Contents

Class ExceptionHandlingFacade

Implements base functionality for the ExceptionHandlingFacade

Inheritance
object
ExceptionHandlingFacade
ApplicationExceptionHandlingFacade
Implements
IExceptionHandlingFacade
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Sartorius.SAF.ExceptionHandling
Assembly: Sartorius.SAF.dll
Syntax
public abstract class ExceptionHandlingFacade : IExceptionHandlingFacade

Constructors

View Source

ExceptionHandlingFacade()

Initializes a new instance of the ExceptionHandlingFacade class.

Declaration
protected ExceptionHandlingFacade()

Properties

View Source

ExceptionHandlingBehaviors

Gets or sets the behavior for handling unhandled exceptions.

Declaration
public IExceptionHandlingBehaviors ExceptionHandlingBehaviors { get; set; }
Property Value
Type Description
IExceptionHandlingBehaviors
View Source

ExceptionsRepository

Gets or sets the default implementation of IExceptionsRepository for saving unhandled exceptions.

Declaration
public IExceptionsRepository ExceptionsRepository { get; set; }
Property Value
Type Description
IExceptionsRepository
View Source

SendExceptionHandler

The send exception EventHandler.

Declaration
protected EventHandler<SendExceptionEventArgs> SendExceptionHandler { get; }
Property Value
Type Description
EventHandler<SendExceptionEventArgs>

Methods

View Source

HandleCompositionException(CompositionException)

Handles the HandleCompositionException

Declaration
protected virtual bool HandleCompositionException(CompositionException ex)
Parameters
Type Name Description
CompositionException ex

The occured HandleCompositionException.

Returns
Type Description
bool
View Source

HandleException(Exception)

Handles the given exception.

Declaration
public void HandleException(Exception ex)
Parameters
Type Name Description
Exception ex

The given exception.

View Source

HandleReflectionTypeLoadException(ReflectionTypeLoadException)

Handles the ReflectionTypeLoadException.

Declaration
protected virtual bool HandleReflectionTypeLoadException(ReflectionTypeLoadException ex)
Parameters
Type Name Description
ReflectionTypeLoadException ex

The ReflectionTypeLoadException.

Returns
Type Description
bool

Returns true if the exception has been handled; otherwise false.

Exceptions
Type Condition
CustomHandledException

Throws exception with details in message if there are loader exceptions details contained in ex.

View Source

LogException(Exception)

Logs the exception.

Declaration
public abstract void LogException(Exception ex)
Parameters
Type Name Description
Exception ex

The exception to log.

View Source

OnUnhandledException(Exception)

Called by HandleException(Exception) when the exception is not handled by registered custom exception handlers. Do not call this method directly but call HandleException(Exception).

Declaration
protected abstract void OnUnhandledException(Exception ex)
Parameters
Type Name Description
Exception ex

The ex.

View Source

RaiseExceptionHandled()

Raises the ExceptionHandled event.

Declaration
protected void RaiseExceptionHandled()
View Source

RaiseSendException(Exception)

Raises the SendException event.

Declaration
protected void RaiseSendException(Exception exception)
Parameters
Type Name Description
Exception exception

The occured Exception.

View Source

RegisterCustomExceptionHandler<T>(Func<T, bool>)

Registers the custom exception handler.

Declaration
public void RegisterCustomExceptionHandler<T>(Func<T, bool> handler) where T : Exception
Parameters
Type Name Description
Func<T, bool> handler

The handler which returns true for handled exceptions.

Type Parameters
Name Description
T

The type of the exception.

Exceptions
Type Condition
ArgumentException

Throws ArgumentException if there is already a registered custom exception handler with the given type.

View Source

RegisterUnHandledExceptionEventHandler()

Registers handlers to the exception events.

Declaration
public abstract void RegisterUnHandledExceptionEventHandler()
View Source

ShouldShutDownApplication(Exception)

Gets a value that indicates whether the application should be shut down if given unhandled exception ex occured.

Declaration
protected bool ShouldShutDownApplication(Exception ex)
Parameters
Type Name Description
Exception ex

An unhandled exception.

Returns
Type Description
bool

trueif the application should be shut down, otherwise false

View Source

UnRegisterCustomExceptionHandler<T>()

Unregisters the custom exception handler.

Declaration
public void UnRegisterCustomExceptionHandler<T>() where T : Exception
Type Parameters
Name Description
T

The type of the exception.

Exceptions
Type Condition
ArgumentException
View Source

UnRegisterUnhandledExceptionEventHandler()

Remove handlers from the exception events.

Declaration
public abstract void UnRegisterUnhandledExceptionEventHandler()

Events

View Source

ExceptionHandled

Raised when an exception has been handled.

Declaration
public event Action ExceptionHandled
Event Type
Type Description
Action
View Source

SendException

Occurs directly when the Exception is going to be sent.

Declaration
public event EventHandler<SendExceptionEventArgs> SendException
Event Type
Type Description
EventHandler<SendExceptionEventArgs>

Implements

IExceptionHandlingFacade

Extension Methods

CollectionExtensions.AddRange<T, TCollection>(TCollection, IEnumerable<T>)
SerializableObjectCloneExtension.Clone<T>(T)
  • View Source
Back to top Generated by DocFX