Using this works fine
@ResponseStatus(value = HttpStatus.NOT_FOUND)
@ExceptionHandler(value = IoTException.class)
public void IoTError() {
}
But when I try to convert to another homemade exception
@ExceptionHandler(value = IoTException.class)
public void IoTError() {
throw new IoTConnectionException();
}
Exception handler is ignored, i.e. IoTException are sent to the view without being converted to IoTConnectionException. But placing a breakpoint showed me enter the IoTError method.
Any idea why ? Thanks :)
ExceptionHandler, so handler is ignored.