code: public static <T extends MethodDescription> ElementMatcher.Junction<T> declaresException(TypeDescription exceptionType) {
          return exceptionType.isAssignableTo(Throwable.class)
                  ? ElementMatchers.<T>declaresGenericException(new CollectionItemMatcher<TypeDescription.Generic>(erasure(exceptionType)))
                  : new BooleanMatcher<T>(false);
      }
docs: Matches a method that declares the given generic exception type as a (erased) exception type.
  
  @param exceptionType The exception type that is matched.
  @param <T>           The type of the matched object.
  @return A matcher that matches any method that exactly matches the provided exception.