Pavalisoft.ExceptionHandling  1.0.0
An Unified API for ASP.NET Core Global Exception handling with ExceptionManager
Pavalisoft.ExceptionHandling.ExceptionDataProvider Class Referenceabstract

Provides base implementation for IExceptionDataProvider More...

Inheritance diagram for Pavalisoft.ExceptionHandling.ExceptionDataProvider:
Pavalisoft.ExceptionHandling.Interfaces.IExceptionDataProvider Pavalisoft.ExceptionHandling.DefaultExceptionDataProvider Pavalisoft.ExceptionHandling.ConfigurationExceptionDataProvider

Public Member Functions

abstract ExceptionSettings LoadExceptionSettings ()
 Loads Exception Settings Configuration More...
 
ExceptionSettings GetExceptionSettings ()
 Gets ExceptionSettings from configuration More...
 
IEnumerable< IExceptionHandlerGetExceptionHandlers ()
 Gets IExceptionHandlers from ExceptionSettings More...
 
IEnumerable< IErrorDetailGetExceptionDetails ()
 Gets IErrorDetails from ExceptionSettings More...
 
IErrorDetail GetExceptionDetail (string errorCodeName)
 Gets IErrorDetail having errorCodeName More...
 
IExceptionHandler GetExceptionHandler (string handlerName)
 Gets IExceptionHandler have name as handlerName More...
 

Public Attributes

bool LocalizationEnabled => _exceptionSettings.EnableLocalization
 
bool LoggingEnabled => _exceptionSettings.EnableLogging
 

Protected Member Functions

 ExceptionDataProvider (Func< HandlingBehaviour, string, IExceptionHandler > exceptionHandlerAccessor)
 Creates an instance of ExceptionDataProvider More...
 

Additional Inherited Members

- Properties inherited from Pavalisoft.ExceptionHandling.Interfaces.IExceptionDataProvider
bool LocalizationEnabled [get]
 Gets true if the Localization enabled otherwise false More...
 
bool LoggingEnabled [get]
 Returns true if logging enbaled otherwsie false. More...
 

Detailed Description

Provides base implementation for IExceptionDataProvider

Constructor & Destructor Documentation

◆ ExceptionDataProvider()

Pavalisoft.ExceptionHandling.ExceptionDataProvider.ExceptionDataProvider ( Func< HandlingBehaviour, string, IExceptionHandler exceptionHandlerAccessor)
protected

Creates an instance of ExceptionDataProvider

Parameters
exceptionHandlerAccessorDependency Service Provider for IExceptionHandler

Member Function Documentation

◆ GetExceptionDetail()

IErrorDetail Pavalisoft.ExceptionHandling.ExceptionDataProvider.GetExceptionDetail ( string  errorCodeName)

Gets IErrorDetail having errorCodeName

Parameters
errorCodeNameError Code
Returns
ErrorDetail

Implements Pavalisoft.ExceptionHandling.Interfaces.IExceptionDataProvider.

◆ GetExceptionDetails()

IEnumerable<IErrorDetail> Pavalisoft.ExceptionHandling.ExceptionDataProvider.GetExceptionDetails ( )

Gets IErrorDetails from ExceptionSettings

Returns
IErrorDetails

Implements Pavalisoft.ExceptionHandling.Interfaces.IExceptionDataProvider.

◆ GetExceptionHandler()

IExceptionHandler Pavalisoft.ExceptionHandling.ExceptionDataProvider.GetExceptionHandler ( string  handlerName)

Gets IExceptionHandler have name as handlerName

Parameters
handlerNameException Exception Handler
Returns
IExceptionHandler

Implements Pavalisoft.ExceptionHandling.Interfaces.IExceptionDataProvider.

◆ GetExceptionHandlers()

IEnumerable<IExceptionHandler> Pavalisoft.ExceptionHandling.ExceptionDataProvider.GetExceptionHandlers ( )

Gets IExceptionHandlers from ExceptionSettings

Returns
IExceptionHandlers

Implements Pavalisoft.ExceptionHandling.Interfaces.IExceptionDataProvider.

◆ GetExceptionSettings()

ExceptionSettings Pavalisoft.ExceptionHandling.ExceptionDataProvider.GetExceptionSettings ( )

◆ LoadExceptionSettings()

abstract ExceptionSettings Pavalisoft.ExceptionHandling.ExceptionDataProvider.LoadExceptionSettings ( )
pure virtual

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