Class DefaultExceptionToErrorInfoConverter
Inheritance
System.Object
DefaultExceptionToErrorInfoConverter
Implements
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()
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
LocalizationOptions
Declaration
protected AbpExceptionLocalizationOptions LocalizationOptions { get; }
Property Value
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
CreateDetailedErrorInfoFromException(Exception)
Declaration
protected virtual RemoteServiceErrorInfo CreateDetailedErrorInfoFromException(Exception exception)
Parameters
| Type |
Name |
Description |
| System.Exception |
exception |
|
Returns
CreateEntityNotFoundError(EntityNotFoundException)
Declaration
protected virtual RemoteServiceErrorInfo CreateEntityNotFoundError(EntityNotFoundException exception)
Parameters
Returns
CreateErrorInfoWithoutCode(Exception)
Declaration
protected virtual RemoteServiceErrorInfo CreateErrorInfoWithoutCode(Exception exception)
Parameters
| Type |
Name |
Description |
| System.Exception |
exception |
|
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 |
| System.Exception |
exception |
|
Returns
| Type |
Description |
| System.Exception |
|
TryToLocalizeExceptionMessage(Exception, RemoteServiceErrorInfo)
Declaration
protected virtual void TryToLocalizeExceptionMessage(Exception exception, RemoteServiceErrorInfo errorInfo)
Parameters
Implements
ITransientDependency
Extension Methods