You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+38-3Lines changed: 38 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -150,9 +150,7 @@ Two versions of this methods exists :
150
150
151
151
### Exception Mapper
152
152
153
-
_Since the version 2.0.0, the method `exceptionMapperFor` from interface `ExceptionHandlerSupport` is deprecated in favor of the new one `forException` from interface `ExceptionMapper`._
154
-
155
-
The various methods `forExceptions` provides a way to chain several Exception Mapper.
153
+
The various methods `forExceptions` from `ExceptionMapper` provides a way to chain several Exception Mapper.
156
154
157
155
Also, some dedicated, _ready to used_, Exception Mapper are provided :
158
156
@@ -161,6 +159,43 @@ Also, some dedicated, _ready to used_, Exception Mapper are provided :
161
159
* `saxExceptionMapper()` - Return an exception mapper that adds to the message of the `RuntimeException` the SAX Error from the underlying exception. **This is only usable when the module java.xml is available**.
162
160
* `transformerExceptionMapper()` - Return an exception mapper that adds to the message of the `RuntimeException` the Transformer Error from the underlying exception. **This is only usable when the module java.xml is available**.
163
161
162
+
#### Define global ExceptionMapper
163
+
164
+
_Since version 2.2.0, it is possible to define a default exception mappers by using service loader._
165
+
166
+
By default, the exception are wrapped in a `WrappedException`. This behaviour may be change by implementing the required `ExceptionMapper` and register them as _service implementation_.
167
+
168
+
To do so, create all the required implementation, for example :
0 commit comments