Show / Hide Table of Contents

Class DefaultExceptionToErrorInfoConverter

Inheritance
object
DefaultExceptionToErrorInfoConverter
Implements
IExceptionToErrorInfoConverter
ITransientDependency
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Volo.Abp.AspNetCore.ExceptionHandling
Assembly: Volo.Abp.ExceptionHandling.dll
Syntax
public class DefaultExceptionToErrorInfoConverter : IExceptionToErrorInfoConverter, ITransientDependency

Constructors

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

Declaration
public DefaultExceptionToErrorInfoConverter(IOptions<AbpExceptionLocalizationOptions> localizationOptions, IStringLocalizerFactory stringLocalizerFactory, IStringLocalizer<AbpExceptionHandlingResource> stringLocalizer, IServiceProvider serviceProvider)
Parameters
Type Name Description
IOptions<AbpExceptionLocalizationOptions> localizationOptions
IStringLocalizerFactory stringLocalizerFactory
IStringLocalizer<AbpExceptionHandlingResource> stringLocalizer
IServiceProvider serviceProvider

Properties

L

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

LocalizationOptions

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

ServiceProvider

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

StringLocalizerFactory

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

Methods

AddExceptionToDetails(Exception, StringBuilder, bool)

Declaration
protected virtual void AddExceptionToDetails(Exception exception, StringBuilder detailBuilder, bool sendStackTraceToClients)
Parameters
Type Name Description
Exception exception
StringBuilder detailBuilder
bool sendStackTraceToClients

Convert(Exception, Action<AbpExceptionHandlingOptions>?)

Declaration
public RemoteServiceErrorInfo Convert(Exception exception, Action<AbpExceptionHandlingOptions>? options = null)
Parameters
Type Name Description
Exception exception
Action<AbpExceptionHandlingOptions> options
Returns
Type Description
RemoteServiceErrorInfo

Convert(Exception, bool)

Declaration
public RemoteServiceErrorInfo Convert(Exception exception, bool includeSensitiveDetails)
Parameters
Type Name Description
Exception exception
bool includeSensitiveDetails
Returns
Type Description
RemoteServiceErrorInfo

CreateDefaultOptions()

Declaration
protected virtual AbpExceptionHandlingOptions CreateDefaultOptions()
Returns
Type Description
AbpExceptionHandlingOptions

CreateDetailedErrorInfoFromException(Exception, bool)

Declaration
protected virtual RemoteServiceErrorInfo CreateDetailedErrorInfoFromException(Exception exception, bool sendStackTraceToClients)
Parameters
Type Name Description
Exception exception
bool sendStackTraceToClients
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, AbpExceptionHandlingOptions)

Declaration
protected virtual RemoteServiceErrorInfo CreateErrorInfoWithoutCode(Exception exception, AbpExceptionHandlingOptions options)
Parameters
Type Name Description
Exception exception
AbpExceptionHandlingOptions options
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
string

TryToGetActualException(Exception)

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

TryToLocalizeExceptionMessage(Exception, RemoteServiceErrorInfo)

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

Implements

IExceptionToErrorInfoConverter
ITransientDependency

Extension Methods

AbpObjectExtensions.As<T>(object)
AbpObjectExtensions.To<T>(object)
LockExtensions.Locking(object, Action)
LockExtensions.Locking<TResult>(object, Func<TResult>)
AbpObjectExtensions.If<T>(T, bool, Action<T>)
AbpObjectExtensions.If<T>(T, bool, Func<T, T>)
AbpObjectExtensions.IsIn<T>(T, IEnumerable<T>)
AbpObjectExtensions.IsIn<T>(T, params T[])
AbpQueryableExtensions.OrderByIf<T, TQueryable>(TQueryable, bool, string)
AbpQueryableExtensions.PageBy<T, TQueryable>(TQueryable, int, int)
AbpQueryableExtensions.WhereIf<T, TQueryable>(TQueryable, bool, Expression<Func<T, bool>>)
AbpQueryableExtensions.WhereIf<T, TQueryable>(TQueryable, bool, Expression<Func<T, int, bool>>)
AbpOpenIddictQueryableExtensions.SkipIf<T, TQueryable>(TQueryable, bool, int?)
AbpOpenIddictQueryableExtensions.TakeIf<T, TQueryable>(TQueryable, bool, int?)
LockExtensions.Locking<T>(T, Action<T>)
LockExtensions.Locking<T, TResult>(T, Func<T, TResult>)
In this article
Back to top Powered by ABP.IO Platform