/** * Creates and throws a SAX exception for the specified exception. * @param ex exception * @throws SAXException SAX exception */ protected static void error(final IOException ex) throws SAXException { final SAXException ioe = new SAXException(Util.message(ex)); ioe.setStackTrace(ex.getStackTrace()); throw ioe; }
/** * Creates and throws a SAX exception for the specified exception. * @param ex exception * @throws SAXException SAX exception */ protected static void error(final IOException ex) throws SAXException { final SAXException ioe = new SAXException(Util.message(ex)); ioe.setStackTrace(ex.getStackTrace()); throw ioe; }
/** * Better sax exception. * * @param saxe the saxe * @param newMessage the new message * * @return the sAX exception */ public static SAXException betterSAXException(SAXException saxe, String newMessage) { Exception cause = saxe.getException(); SAXException betterException = new SAXException(newMessage, cause); betterException.setStackTrace(saxe.getStackTrace()); return betterException; }