title: Spring @ExceptionHandler handling multiple kinds of exceptions
body: <p>I can't figure out how to handle more than one kind of exception by @ExceptionHandler. </p>
  
  <p>I need to programmatically deal with these exceptions, for this I'd need a shared reference. Is this done via this reference "Exception ex" ? I don't think so, cause the exception is not caught like this, how would I do it then ?</p>
  
  <p>I can't put all the exception references as arguments to the handler method, it wouldn't make sense, it can't be programmatically dealt with. I need a shared reference so that I could use "instanceof" on it or just send it somewhere else as a general "Exception"</p>
  
  <pre><code>@ExceptionHandler({DescriptionCstOrderException.class, SpecializationCstOrderException.class, NoUploadFileException.class,
                      DeadLineCstOrderException.class, DocumentCstOrderException.class, CommentCstOrderException.class})
  public String handleFormException(Exception ex, ActionRequest actionRequest) {
      logger.error(ex.getMessage());
      SessionErrors.add(actionRequest, ex.getClass().getName());  
      return "mainOrderForm";
    }
  </code></pre>
  
  <p>Additional question: what if I wanted to handle <code>org.springframework.web.multipart.MaxUploadSizeExceededException</code>, that is not thrown from any method of the handler? Because <code>@ExceptionHandler</code> catches only exceptions that are thrown from one of the handler methods.</p>
  
  <p>The <code>exceptionHandler</code> method could be placed into some extended parent controller but if one uses only <code>defaultAnnotationHandlerMapping</code>... ?</p>
  
  <p>Appreciate any help, I'm going crazy, this is very frustrating....</p>