Skip to content

Commit c18b0e0

Browse files
update readme with the informations of to customize exception type
1 parent cbaf289 commit c18b0e0

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

README-nuget.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,12 @@ throw new NotFoundException("Custom not found exception message");
114114
throw new Exception("Custom exception message");
115115
```
116116

117+
#### Customize exception type
118+
It's possible to customize the exception type when throw an exception, just pass the type in an exception constructor.
119+
```c#
120+
throw new CustomDomainException("Custom domain exception message", "OTHER_CUSTOM_TYPE");
121+
```
122+
117123
### Samples
118124
Inside the `samples` folder has two projects that could be used for test the and validate the middleware.
119125

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,12 @@ throw new NotFoundException("Custom not found exception message");
113113
throw new Exception("Custom exception message");
114114
```
115115

116+
#### Customize exception type
117+
It's possible to customize the exception type when throw an exception, just pass the type in an exception constructor.
118+
```c#
119+
throw new CustomDomainException("Custom domain exception message", "OTHER_CUSTOM_TYPE");
120+
```
121+
116122
### Samples
117123
Inside the `samples` folder has two projects that could be used for test the and validate the middleware.
118124

0 commit comments

Comments
 (0)