code: public boolean hasException(Class<? extends Throwable> type) {
          for (Throwable exception : exceptions) {
              if (type.isInstance(exception)) {
                  return true;
              }
          }
          
          return false;
      }
docs: Returns true if this instance contains an exception of the given type.
  
  @param type The exception class sought.
  @return True if the exception class is present.