Package java.text

Examples of java.text.ParseException.initCause()


                ise.initCause(ex);
                throw ise;
            } catch (Exception ex) {
                checkErrors();
                ParseException pe = new ParseException(ex.getMessage(), 0);
                pe.initCause(ex);
                throw pe;
            }
        }

        public void startElement(String uri, String localName, String qName, Attributes attributes)
View Full Code Here


        } catch (IOException e) {
            throw e;
        } catch (Exception e) {
            ParseException pe = new ParseException("failed to load settings from " + settingsUrl
                    + ": " + e.getMessage(), 0);
            pe.initCause(e);
            throw pe;
        } finally {
            if (stream != null) {
                try {
                    stream.close();
View Full Code Here

        try {
            parser.parse();
        } catch (Exception e) {
            ParseException pe = new ParseException("failed to parse report: " + report + ": "
                    + e.getMessage(), 0);
            pe.initCause(e);
            throw pe;
        }
    }

    public Artifact[] getArtifacts() {
View Full Code Here

        Parser parser = new Parser(this, res);
        try {
            XMLHelper.parse(descriptorURL, null, parser);
        } catch (SAXException ex) {
            ParseException pe = new ParseException(ex.getMessage() + " in " + descriptorURL, 0);
            pe.initCause(ex);
            throw pe;
        } catch (ParserConfigurationException ex) {
            IllegalStateException ise = new IllegalStateException(ex.getMessage() + " in "
                    + descriptorURL);
            ise.initCause(ex);
View Full Code Here

                ise.initCause(ex);
                throw ise;
            } catch (Exception ex) {
                checkErrors();
                ParseException pe = new ParseException(ex.getMessage() + " in " + descriptorURL, 0);
                pe.initCause(ex);
                throw pe;
            }
        }

        public void startElement(String uri, String localName, String qName, Attributes attributes)
View Full Code Here

                        .setPubdate(md.getResolvedPublicationDate())
                        .setUpdateBranch(false)
                        .setNamespace(ns));
        } catch (SAXException e) {
            ParseException ex = new ParseException("exception occurred while parsing " + res, 0);
            ex.initCause(e);
            throw ex;
        } finally {
            if (is != null) {
                is.close();
            }
View Full Code Here

      try {
        return XMLUtil.parseXML(source, validating);
      } catch (ParseException e) {
        // wrap the exception in order to report the file path
        ParseException pe = new ParseException("The file " + file.getAbsolutePath() + " could not be parsed", -1);
        pe.initCause(e);
        throw pe;
      }
    } finally {
      if (stream != null) {
        try {
View Full Code Here

    // Create the builder and parse the file
    try {
      return factory.newDocumentBuilder().parse(source);
    } catch (IOException e) {
      ParseException pe = new ParseException("IO exception while parsing XML", -1);
      pe.initCause(e);
      throw pe;
    } catch (ParserConfigurationException e) {
      ParseException pe = new ParseException("XML could not be parsed", -1);
      pe.initCause(e);
      throw pe;
View Full Code Here

      ParseException pe = new ParseException("IO exception while parsing XML", -1);
      pe.initCause(e);
      throw pe;
    } catch (ParserConfigurationException e) {
      ParseException pe = new ParseException("XML could not be parsed", -1);
      pe.initCause(e);
      throw pe;
    } catch (SAXException e) {
      ParseException pe = new ParseException("XML contains invalid XML", -1);
      pe.initCause(e);
      throw pe;
View Full Code Here

      ParseException pe = new ParseException("XML could not be parsed", -1);
      pe.initCause(e);
      throw pe;
    } catch (SAXException e) {
      ParseException pe = new ParseException("XML contains invalid XML", -1);
      pe.initCause(e);
      throw pe;
    }
  }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.