The trouble with that approach is that that XmlProcessor.run will have
to be declared as throwing Exception, which is horrible and will make
things ugly when application writers call run. I want XmlProcessor.run
to be declared as throwing java.io.IOException (there's no way it can be
more restrictive that this).
There's no perfect solution, but I think it would be worth considering
restricting callbacks to throwing java.io.IOException. This would allow
run can be declared as throwing java.io.IOException. This isn't much of
a burden on application callbacks: IOException is fairly broad in Java,
and the callbacks are processing input so it isn't unreasonable to
restrict the exceptions they throw to IOException. Also this wouldn't
require parser writers to catch and repack exceptions thrown by
application callbacks.
James