Artyom Gornostayev
04/29/2020, 2:10 PM@RestControllerAdvice
class ExceptionHandlingAdvice {
@ExceptionHandler(NotImplementedError::class)
fun notImplementedYet(exception: NotImplementedError): ResponseEntity<ErrorResponse> =
exception.toNotImplementedErrorResponse()
@ExceptionHandler(Throwable::class)
fun unexpectedException(exception: Throwable): ResponseEntity<ErrorResponse> =
exception.toInternalServerErrorResponse()
}
When I call TODO()
method somewhere in the application the kotlin.NotImplementedError
is occurred. However, the first hadler does not get it.
Does anybody has such a problem?thanksforallthefish
04/29/2020, 2:38 PMNestedServletException
in the DispatcherServlet
Artyom Gornostayev
04/29/2020, 9:23 PMArtyom Gornostayev
05/06/2020, 6:38 PM