title: Why exception handler is not catching error in Spring MVC
body: <p>I want to catch an Error in springMVC3 using exception handler. I annotated the exception. I can catch throwable and any exception. But when I tried with Error, It is not catching the exception. Any idea why it is so? The below code catches exceptions</p>
  <pre><code>ExceptionHandler(InvalidDataException.class)
  public ModelMap handleException(InvalidDataException ex) {
      logger.debug(&quot;exception catched  :&quot; + ex);
  
      return new ModelMap();
  
  }
  </code></pre>
  <p>But the below is not catching;</p>
  <pre><code>@ExceptionHandler(Error.class)
  public ModelMap handleException(Error ex) {
      logger.debug(&quot;exception catched  :&quot; + ex);
  
      return new ModelMap();
  
  }
  </code></pre>