Browse Source

Update Exception-Handling.md

pull/2916/head
maliming 7 years ago
committed by GitHub
parent
commit
75972bde74
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      docs/en/Exception-Handling.md

4
docs/en/Exception-Handling.md

@ -204,7 +204,7 @@ Instead of localizing the message while throwing the exception, you can separate
First, define the **code-namespace** to **localization resource** mapping in the module configuration: First, define the **code-namespace** to **localization resource** mapping in the module configuration:
````C# ````C#
services.Configure<ExceptionLocalizationOptions>(options => services.Configure<AbpExceptionLocalizationOptions>(options =>
{ {
options.MapCodeNamespace("Volo.Qa", typeof(QaResource)); options.MapCodeNamespace("Volo.Qa", typeof(QaResource));
}); });
@ -285,7 +285,7 @@ The `IHttpExceptionStatusCodeFinder` is used to automatically determine the HTTP
Automatic HTTP status code determination can be overrided by custom mappings. For example: Automatic HTTP status code determination can be overrided by custom mappings. For example:
````C# ````C#
services.Configure<ExceptionHttpStatusCodeOptions>(options => services.Configure<AbpExceptionHttpStatusCodeOptions>(options =>
{ {
options.Map("Volo.Qa:010002", HttpStatusCode.Conflict); options.Map("Volo.Qa:010002", HttpStatusCode.Conflict);
}); });

Loading…
Cancel
Save