if (throwables[i].getClass().equals(type)) {
if (type.isAssignableFrom(throwables[i].getClass())) {
    public int indexOfThrowable(Class type, int fromIndex) {        if (fromIndex < 0) {            throw new IndexOutOfBoundsException("The start index was out of bounds: " + fromIndex);        }        Throwable[] throwables = ExceptionUtils.getThrowables(this.nestable);        if (fromIndex >= throwables.length) {            throw new IndexOutOfBoundsException("The start index was out of bounds: "                + fromIndex + " >= " + throwables.length);        }        for (int i = fromIndex; i < throwables.length; i++) {            if (throwables[i].getClass().equals(type)) {                return i;            }        }        return -1;    }