Class DefaultExceptionToErrorInfoConverter
Inheritance
object
DefaultExceptionToErrorInfoConverter
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
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 |
| Microsoft.Extensions.Options.IOptions<TOptions><AbpExceptionLocalizationOptions> |
localizationOptions |
|
| Microsoft.Extensions.Localization.IStringLocalizerFactory |
stringLocalizerFactory |
|
| Microsoft.Extensions.Localization.IStringLocalizer<T><AbpExceptionHandlingResource> |
stringLocalizer |
|
| System.IServiceProvider |
serviceProvider |
|
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 |
| System.IServiceProvider |
|
StringLocalizerFactory
Declaration
protected IStringLocalizerFactory StringLocalizerFactory { get; }
Property Value
| Type |
Description |
| Microsoft.Extensions.Localization.IStringLocalizerFactory |
|
Methods
AddExceptionToDetails(Exception, StringBuilder, bool)
Declaration
protected virtual void AddExceptionToDetails(Exception exception, StringBuilder detailBuilder, bool sendStackTraceToClients)
Parameters
| Type |
Name |
Description |
| System.Exception |
exception |
|
| System.Text.StringBuilder |
detailBuilder |
|
| bool |
sendStackTraceToClients |
|
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 |
| System.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 |
| System.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
| 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
Extension Methods