Why would I not be able to catch an exception?
Specifically, when using the javax.xml.parsers.SAXParser package to open a URI with an invalid hostname (eg "www.w3.or" -- note the missing "g"), I get a java.net.UnknownHostException.
All well and good. But I can't catch it in the top-level invoking function. It travels right past my my catch (java.net.UnknownHostException uhe), past my catch( Throwable t ), past my main(), and the call stack is printed out by the VM (1.4.1_01, running under Win2K).
You've got your flow control wrong - it's perfectly catchable.
Aha. Too much debugging code, not enough thought. I was doing a universal catch in an inner function, and then calling System.exit(). Not helpful.
Thanks for letting me bounce this off you.
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center