Class DefaultExceptionToErrorInfoConverter
Inheritance
System.Object
DefaultExceptionToErrorInfoConverter
Implements
ITransientDependency
Assembly: Volo.Abp.ExceptionHandling.dll
Syntax
public class DefaultExceptionToErrorInfoConverter : object, 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
| Type |
Description |
| 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 |
| Exception |
exception |
|
| StringBuilder |
detailBuilder |
|
Convert(Exception, Boolean)
Declaration
public RemoteServiceErrorInfo Convert(Exception exception, bool includeSensitiveDetails)
Parameters
| Type |
Name |
Description |
| Exception |
exception |
|
| System.Boolean |
includeSensitiveDetails |
|
Returns
CreateDetailedErrorInfoFromException(Exception)
Declaration
protected virtual RemoteServiceErrorInfo CreateDetailedErrorInfoFromException(Exception exception)
Parameters
| Type |
Name |
Description |
| Exception |
exception |
|
Returns
CreateEntityNotFoundError(EntityNotFoundException)
Declaration
protected virtual RemoteServiceErrorInfo CreateEntityNotFoundError(EntityNotFoundException exception)
Parameters
Returns
CreateErrorInfoWithoutCode(Exception, Boolean)
Declaration
protected virtual RemoteServiceErrorInfo CreateErrorInfoWithoutCode(Exception exception, bool includeSensitiveDetails)
Parameters
| Type |
Name |
Description |
| Exception |
exception |
|
| System.Boolean |
includeSensitiveDetails |
|
Returns
GetValidationErrorInfos(IHasValidationErrors)
Declaration
protected virtual RemoteServiceValidationErrorInfo[] GetValidationErrorInfos(IHasValidationErrors validationException)
Parameters
| Type |
Name |
Description |
| IHasValidationErrors |
validationException |
|
Returns
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 |
| Exception |
exception |
|
Returns
| Type |
Description |
| Exception |
|
TryToLocalizeExceptionMessage(Exception, RemoteServiceErrorInfo)
Declaration
protected virtual void TryToLocalizeExceptionMessage(Exception exception, RemoteServiceErrorInfo errorInfo)
Parameters
Implements
ITransientDependency
Extension Methods