Check with Robert on how to properly implement this before actually doing it.
In Main.main, the return value from the doclet is ignored.
// pass off control to the doclet
I think what should happen is, if nerrors is 0, that is if the doclet
did not call printError to generate their own error, one should be
printed for them - "Doclet failed". Then, when Main.exit is called
the exit status will be correct.
No diagnostic is required - the doclet can print its own error messages.
I have fixed javadoc to use the exit status of the doclet.