boolean (Exception ex) { if (ex instanceof ProcessCanceledException) throw (ProcessCanceledException)ex; if (ex instanceof XmlResourceResolver.IgnoredResourceException) throw (XmlResourceResolver.IgnoredResourceException)ex; if (ex instanceof FileNotFoundException || ex instanceof MalformedURLException || ex instanceof NoRouteToHostException || ex instanceof SocketTimeoutException || ex instanceof UnknownHostException || ex instanceof ConnectException ) { // do not log problems caused by malformed and/or ignored external resources return true; } if (ex instanceof ArrayIndexOutOfBoundsException) { // thrown by xerces on malformed xml return true; } return false; }