Browse Source

Rename SendAllExceptionsToClients to SendExceptionsDetailsToClients

pull/5067/head
liangshiwei 6 years ago
parent
commit
4114733ef4
  1. 6
      docs/en/Exception-Handling.md
  2. 4
      docs/zh-Hans/Exception-Handling.md
  3. 2
      framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/ExceptionHandling/AbpExceptionHandlingOptions.cs
  4. 2
      framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/ExceptionHandling/DefaultExceptionToErrorInfoConverter.cs

6
docs/en/Exception-Handling.md

@ -323,11 +323,11 @@ You can also throw these type of exceptions in your code (although it's rarely n
## Send exception details to the client
You can send exceptions to the client via the `SendAllExceptionsToClients` property of the `AbpExceptionHandlingOptions` class:
You can send exceptions to the client via the `SendExceptionsDetailsToClients` property of the `AbpExceptionHandlingOptions` class:
````csharp
services.Configure<AbpExceptionHandlingOptions>(options =>
{
options.SendAllExceptionsToClients = true;
options.SendExceptionsDetailsToClients = true;
});
````
````

4
docs/zh-Hans/Exception-Handling.md

@ -303,11 +303,11 @@ services.Configure<AbpExceptionHttpStatusCodeOptions>(options =>
## 发送异常详情到客户端
你可以通过 `AbpExceptionHandlingOptions` 类的 `SendAllExceptionsToClients` 属性异常发送到客户端:
你可以通过 `AbpExceptionHandlingOptions` 类的 `SendExceptionsDetailsToClients` 属性异常发送到客户端:
````csharp
services.Configure<AbpExceptionHandlingOptions>(options =>
{
options.SendAllExceptionsToClients = true;
options.SendExceptionsDetailsToClients = true;
});
````

2
framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/ExceptionHandling/AbpExceptionHandlingOptions.cs

@ -2,6 +2,6 @@
{
public class AbpExceptionHandlingOptions
{
public bool SendAllExceptionsToClients { get; set; } = false;
public bool SendExceptionsDetailsToClients { get; set; } = false;
}
}

2
framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/ExceptionHandling/DefaultExceptionToErrorInfoConverter.cs

@ -53,7 +53,7 @@ namespace Volo.Abp.AspNetCore.ExceptionHandling
protected virtual RemoteServiceErrorInfo CreateErrorInfoWithoutCode(Exception exception)
{
if (ExceptionHandlingOptions.SendAllExceptionsToClients)
if (ExceptionHandlingOptions.SendExceptionsDetailsToClients)
{
return CreateDetailedErrorInfoFromException(exception);
}

Loading…
Cancel
Save