code: @Override
      public ExceptionHandler getExceptionHandler(Exception exception) {
          Class<? extends Exception> exceptionClass = exception.getClass();
          if (!exceptionHandlers.containsKey(exceptionClass)) {
              Class<?> superClass = exceptionClass.getSuperclass();
              while (superClass != null) {
                  if (exceptionHandlers.containsKey(superClass)) {
                      ExceptionHandler exceptionHandler = exceptionHandlers.get(superClass);
                      exceptionHandlers.put(exceptionClass, exceptionHandler);
  
                      return exceptionHandler;
                  }
  
                  superClass = superClass.getSuperclass();
              }
  
              // avoid superclass traversal in the future if we didn't find a handler
              exceptionHandlers.put(exceptionClass, null);
          }
  
          return exceptionHandlers.get(exceptionClass);
      }
docs: Returns an ExceptionHandler registered for this exception type.
  If no handler is found it returns null and the default handle
  (this class) is used.
  
  @param exception
  @return an exception handler or null