Class DefaultExceptionToErrorInfoConverter
Inheritance
DefaultExceptionToErrorInfoConverter
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
Properties
L
Declaration
protected IStringLocalizer<AbpExceptionHandlingResource> L { get; }
Property Value
LocalizationOptions
Declaration
protected AbpExceptionLocalizationOptions LocalizationOptions { get; }
Property Value
ServiceProvider
Declaration
protected IServiceProvider ServiceProvider { get; }
Property Value
StringLocalizerFactory
Declaration
protected IStringLocalizerFactory StringLocalizerFactory { get; }
Property Value
Methods
AddExceptionToDetails(Exception, StringBuilder, bool)
Declaration
protected virtual void AddExceptionToDetails(Exception exception, StringBuilder detailBuilder, bool sendStackTraceToClients)
Parameters
Convert(Exception, Action<AbpExceptionHandlingOptions>?)
Declaration
public RemoteServiceErrorInfo Convert(Exception exception, Action<AbpExceptionHandlingOptions>? options = null)
Parameters
Returns
Convert(Exception, bool)
Declaration
public RemoteServiceErrorInfo Convert(Exception exception, bool includeSensitiveDetails)
Parameters
Type |
Name |
Description |
Exception |
exception |
|
bool |
includeSensitiveDetails |
|
Returns
CreateDefaultOptions()
Declaration
protected virtual AbpExceptionHandlingOptions CreateDefaultOptions()
Returns
CreateDetailedErrorInfoFromException(Exception, bool)
Declaration
protected virtual RemoteServiceErrorInfo CreateDetailedErrorInfoFromException(Exception exception, bool sendStackTraceToClients)
Parameters
Type |
Name |
Description |
Exception |
exception |
|
bool |
sendStackTraceToClients |
|
Returns
CreateEntityNotFoundError(EntityNotFoundException)
Declaration
protected virtual RemoteServiceErrorInfo CreateEntityNotFoundError(EntityNotFoundException exception)
Parameters
Returns
CreateErrorInfoWithoutCode(Exception, AbpExceptionHandlingOptions)
Declaration
protected virtual RemoteServiceErrorInfo CreateErrorInfoWithoutCode(Exception exception, AbpExceptionHandlingOptions options)
Parameters
Returns
GetValidationErrorInfos(IHasValidationErrors)
Declaration
protected virtual RemoteServiceValidationErrorInfo[] GetValidationErrorInfos(IHasValidationErrors validationException)
Parameters
Returns
GetValidationErrorNarrative(IHasValidationErrors)
Declaration
protected virtual string GetValidationErrorNarrative(IHasValidationErrors validationException)
Parameters
Returns
TryToGetActualException(Exception)
Declaration
protected virtual Exception TryToGetActualException(Exception exception)
Parameters
Returns
TryToLocalizeExceptionMessage(Exception, RemoteServiceErrorInfo)
Declaration
protected virtual void TryToLocalizeExceptionMessage(Exception exception, RemoteServiceErrorInfo errorInfo)
Parameters
Implements
Extension Methods