void errorUncaught() {
        for (PendingExit exit = pendingExits.next();
             exit != null;
             exit = pendingExits.next()) {
            boolean synthetic = classDef != null &&
                classDef.pos == exit.tree.pos;
            log.error(exit.tree.pos(),
                      synthetic
                      ? "unreported.exception.default.constructor"
                      : "unreported.exception.need.to.catch.or.throw",
                      exit.thrown);
        }
    }