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