Show / Hide Table of Contents

Class DefaultExceptionToErrorInfoConverter

Inheritance
System.Object
DefaultExceptionToErrorInfoConverter
Implements
IExceptionToErrorInfoConverter
ITransientDependency
Inherited Members
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: Volo.Abp.AspNetCore.ExceptionHandling
Assembly: Volo.Abp.AspNetCore.dll
Syntax
public class DefaultExceptionToErrorInfoConverter : IExceptionToErrorInfoConverter, ITransientDependency

Constructors

DefaultExceptionToErrorInfoConverter(IOptions<AbpExceptionLocalizationOptions>, IStringLocalizerFactory, IStringLocalizer<AbpUiResource>, IServiceProvider)

Declaration
public DefaultExceptionToErrorInfoConverter(IOptions<AbpExceptionLocalizationOptions> localizationOptions, IStringLocalizerFactory stringLocalizerFactory, IStringLocalizer<AbpUiResource> abpUiStringLocalizer, IServiceProvider serviceProvider)
Parameters
Type Name Description
IOptions<AbpExceptionLocalizationOptions> localizationOptions
IStringLocalizerFactory stringLocalizerFactory
IStringLocalizer<AbpUiResource> abpUiStringLocalizer
System.IServiceProvider serviceProvider

Properties

L

Declaration
protected IStringLocalizer<AbpUiResource> L { get; }
Property Value
Type Description
IStringLocalizer<AbpUiResource>

LocalizationOptions

Declaration
protected AbpExceptionLocalizationOptions LocalizationOptions { get; }
Property Value
Type Description
AbpExceptionLocalizationOptions

SendAllExceptionsToClients

Declaration
public bool SendAllExceptionsToClients { get; set; }
Property Value
Type Description
System.Boolean

ServiceProvider

Declaration
protected IServiceProvider ServiceProvider { get; }
Property Value
Type Description
System.IServiceProvider

StringLocalizerFactory

Declaration
protected IStringLocalizerFactory StringLocalizerFactory { get; }
Property Value
Type Description
IStringLocalizerFactory

Methods

AddExceptionToDetails(Exception, StringBuilder)

Declaration
protected virtual void AddExceptionToDetails(Exception exception, StringBuilder detailBuilder)
Parameters
Type Name Description
System.Exception exception
System.Text.StringBuilder detailBuilder

Convert(Exception)

Declaration
public RemoteServiceErrorInfo Convert(Exception exception)
Parameters
Type Name Description
System.Exception exception
Returns
Type Description
RemoteServiceErrorInfo

CreateDetailedErrorInfoFromException(Exception)

Declaration
protected virtual RemoteServiceErrorInfo CreateDetailedErrorInfoFromException(Exception exception)
Parameters
Type Name Description
System.Exception exception
Returns
Type Description
RemoteServiceErrorInfo

CreateEntityNotFoundError(EntityNotFoundException)

Declaration
protected virtual RemoteServiceErrorInfo CreateEntityNotFoundError(EntityNotFoundException exception)
Parameters
Type Name Description
EntityNotFoundException exception
Returns
Type Description
RemoteServiceErrorInfo

CreateErrorInfoWithoutCode(Exception)

Declaration
protected virtual RemoteServiceErrorInfo CreateErrorInfoWithoutCode(Exception exception)
Parameters
Type Name Description
System.Exception exception
Returns
Type Description
RemoteServiceErrorInfo

GetValidationErrorInfos(IHasValidationErrors)

Declaration
protected virtual RemoteServiceValidationErrorInfo[] GetValidationErrorInfos(IHasValidationErrors validationException)
Parameters
Type Name Description
IHasValidationErrors validationException
Returns
Type Description
RemoteServiceValidationErrorInfo[]

GetValidationErrorNarrative(IHasValidationErrors)

Declaration
protected virtual string GetValidationErrorNarrative(IHasValidationErrors validationException)
Parameters
Type Name Description
IHasValidationErrors validationException
Returns
Type Description
System.String

TryToGetActualException(Exception)

Declaration
protected virtual Exception TryToGetActualException(Exception exception)
Parameters
Type Name Description
System.Exception exception
Returns
Type Description
System.Exception

TryToLocalizeExceptionMessage(Exception, RemoteServiceErrorInfo)

Declaration
protected virtual void TryToLocalizeExceptionMessage(Exception exception, RemoteServiceErrorInfo errorInfo)
Parameters
Type Name Description
System.Exception exception
RemoteServiceErrorInfo errorInfo

Implements

IExceptionToErrorInfoConverter
ITransientDependency

Extension Methods

AbpObjectExtensions.As<T>(Object)
AbpObjectExtensions.To<T>(Object)
AbpObjectExtensions.IsIn<T>(T, T[])
AbpObjectExtensions.If<T>(T, Boolean, Func<T, T>)
AbpObjectExtensions.If<T>(T, Boolean, Action<T>)
LockExtensions.Locking(Object, Action)
LockExtensions.Locking<T>(T, Action<T>)
LockExtensions.Locking<TResult>(Object, Func<TResult>)
LockExtensions.Locking<T, TResult>(T, Func<T, TResult>)
Back to top Powered by Volosoft