Package java.text

Examples of java.text.ParseException.initCause()


      // fromValid(), we implement this method in terms of that one rather
      // than the reverse.

      ParseException parseException =
          new ParseException("Invalid host specifier: " + specifier, 0);
      parseException.initCause(e);
      throw parseException;
    }
  }

  /**
 
View Full Code Here


        q.setMeasure(measure);
        try {
            q.init();
        } catch (Exception e) {
            ParseException e2 = new ParseException(query + ": " + e.getMessage(), 0);
            e2.initCause(e);
            throw e2;
        }
        return q;
    }
   
View Full Code Here

        if (namePathMapper != null) {
            try {
                nodeTypeName = namePathMapper.getOakName(nodeTypeName);
            } catch (RepositoryException e) {
                ParseException e2 = getSyntaxError("could not convert node type name " + nodeTypeName);
                e2.initCause(e);
                throw e2;
            }
        }
        NodeState type = types.getChildNode(nodeTypeName);
        if (!type.exists()) {
View Full Code Here

                parser.setIncludeSelectorNameInWildcardColumns(false);
                return parser.parse(sql2);
            } catch (ParseException e) {
                ParseException e2 = new ParseException(
                        statement + " converted to SQL-2 " + e.getMessage(), 0);
                e2.initCause(e);
                throw e2;
            }
        } else {
            throw new ParseException("Unsupported language: " + language, 0);
        }
View Full Code Here

    }

    private ParseException newParserException(Exception e) {
        Message.error(e.getMessage());
        ParseException pe = new ParseException(e.getMessage(), 0);
        pe.initCause(e);
        return pe;
    }

}
View Full Code Here

                        .setRevision(md.getResolvedModuleRevisionId().getRevision())
                        .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 {
            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

                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

        } 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

        q.setMeasure(measure);
        try {
            q.init();
        } catch (Exception e) {
            ParseException e2 = new ParseException(query + ": " + e.getMessage(), 0);
            e2.initCause(e);
            throw e2;
        }
        return q;
    }
   
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.