File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -114,6 +114,12 @@ throw new NotFoundException("Custom not found exception message");
114
114
throw new Exception (" Custom exception message" );
115
115
```
116
116
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
+
117
123
### Samples
118
124
Inside the ` samples ` folder has two projects that could be used for test the and validate the middleware.
119
125
Original file line number Diff line number Diff line change @@ -113,6 +113,12 @@ throw new NotFoundException("Custom not found exception message");
113
113
throw new Exception (" Custom exception message" );
114
114
```
115
115
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
+
116
122
### Samples
117
123
Inside the ` samples ` folder has two projects that could be used for test the and validate the middleware.
118
124
You can’t perform that action at this time.
0 commit comments