Show / Hide Table of Contents

Interface IExceptionHandlingFacade

Defines methods for handling exceptions.

Namespace: Sartorius.SAF.ExceptionHandling
Assembly: Sartorius.SAF.dll
Syntax
public interface IExceptionHandlingFacade

Properties

View Source

ExceptionHandlingBehaviors

Gets or sets the behavior for handling unhandled exceptions.

Declaration
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
IExceptionsRepository ExceptionsRepository { get; set; }
Property Value
Type Description
IExceptionsRepository

Methods

View Source

HandleException(Exception)

Handles the given exception.

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

The given exception.

View Source

LogException(Exception)

Logs the exception.

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

The exception to log.

View Source

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

Registers the custom exception handler.

Declaration
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

A subtype of System.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 DispatcherUnhandledException and UnhandledException events.

Declaration
void RegisterUnHandledExceptionEventHandler()
View Source

UnRegisterCustomExceptionHandler<T>()

Unregisters the custom exception handler.

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

The type of the exception.

Exceptions
Type Condition
System.ArgumentException

Throws System.ArgumentException if there is no registered custom exception handler with the given type.

View Source

UnRegisterUnhandledExceptionEventHandler()

Unregisters handlers from the DispatcherUnhandledException and UnhandledException events.

Declaration
void UnRegisterUnhandledExceptionEventHandler()

Events

View Source

ExceptionHandled

Raised when an exception has been handled.

Declaration
event Action ExceptionHandled
Event Type
Type Description
System.Action
View Source

SendException

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

Declaration
event EventHandler<SendExceptionEventArgs> SendException
Event Type
Type Description
System.EventHandler<SendExceptionEventArgs>

Extension Methods

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