Show / Hide Table of Contents

Class ExceptionHandlingFacade

Implements base functionality for the ExceptionHandlingFacade

Inheritance
System.Object
ExceptionHandlingFacade
ApplicationExceptionHandlingFacade
Implements
IExceptionHandlingFacade
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.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 System.EventHandler.

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

Methods

View Source

HandleCompositionException(CompositionException)

Handles the HandleCompositionException

Declaration
protected virtual bool HandleCompositionException(CompositionException ex)
Parameters
Type Name Description
System.ComponentModel.Composition.CompositionException ex

The occured HandleCompositionException.

Returns
Type Description
System.Boolean
View Source

HandleException(Exception)

Handles the given exception.

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

The given exception.

View Source

HandleReflectionTypeLoadException(ReflectionTypeLoadException)

Handles the ReflectionTypeLoadException.

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

The ReflectionTypeLoadException.

Returns
Type Description
System.Boolean

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
System.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
System.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
System.Exception exception

The occured System.Exception.

View Source

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

Registers the custom exception handler.

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

The handler which returns true for handled exceptions.

Type Parameters
Name Description
T

The type of the exception.

Exceptions
Type Condition
System.ArgumentException

Throws System.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
System.Exception ex

An unhandled exception.

Returns
Type Description
System.Boolean

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
System.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
System.Action
View Source

SendException

Occurs directly when the System.Exception is going to be sent.

Declaration
public event EventHandler<SendExceptionEventArgs> SendException
Event Type
Type Description
System.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