MethodDoc implMethod = findImplMethod(method);
if (implMethod != null) { // should not be null
for (ClassDoc ex : implMethod.thrownExceptions()) {
if (!ex.subclassOf(env.docException())) {
env.error("rmic.must.only.throw.exception",
implMethod.name() + implMethod.signature(),
ex.qualifiedName());
errors = true;
continue nextMethod;
}
}