Examples of ParsingException


Examples of com.facebook.presto.sql.parser.ParsingException

    @Nullable
    private static ErrorLocation getErrorLocation(Throwable throwable)
    {
        // TODO: this is a big hack
        if (throwable instanceof ParsingException) {
            ParsingException e = (ParsingException) throwable;
            return new ErrorLocation(e.getLineNumber(), e.getColumnNumber());
        }
        return null;
    }
View Full Code Here

Examples of com.google.code.com.sun.mail.iap.ParsingException

 
    private void parse() throws ParsingException {
  skipSpaces();
  if (buffer[index] != '(')
      throw new ParsingException(
    "error in FETCH parsing, missing '(' at index " + index);

  Vector v = new Vector();
  Item i = null;
  do {
      index++; // skip '(', or SPACE

      if (index >= size)
    throw new ParsingException(
    "error in FETCH parsing, ran off end of buffer, size " + size);

      switch(buffer[index]) {
      case 'E':
    if (match(ENVELOPE.name)) {
View Full Code Here

Examples of com.google.refine.expr.ParsingException

    }

    protected ParsingException makeException(String desc) {
        int index = _token != null ? _token.start : _scanner.getIndex();

        return new ParsingException("Parsing error at offset " + index + ": " + desc);
    }
View Full Code Here

Examples of com.sun.mail.iap.ParsingException

 
    private void parse() throws ParsingException {
  skipSpaces();
  if (buffer[index] != '(')
      throw new ParsingException(
    "error in FETCH parsing, missing '(' at index " + index);

  Vector v = new Vector();
  Item i = null;
  do {
      index++; // skip '(', or SPACE

      if (index >= size)
    throw new ParsingException(
    "error in FETCH parsing, ran off end of buffer, size " + size);

      switch(buffer[index]) {
      case 'E':
    if (match(ENVELOPE.name)) {
View Full Code Here

Examples of com.sun.xacml.ParsingException

            return Policy.getInstance(root);
        } else if (name.equals("PolicySet")) {
            return PolicySet.getInstance(root, policyFinder);
        } else {
            // this isn't a root type that we know how to handle
            throw new ParsingException("Unknown root document type: " + name);
        }
    }
View Full Code Here

Examples of edu.mit.simile.fresnel.selection.ParsingException

              Resource facetNode = (Resource) listI.next();
              Facet facet = new Facet(facetNode);
              out.addFacet(facet);
            }
          } else {
            throw new ParsingException(facetsNode.toString() + "is not a valid rdf:List");
          }
        }
      }
      facetI.close();

            RepositoryResult<Statement> hidesI = conn.getStatements(focus, Facets.hides, (Value) null, false);
      if (hidesI.hasNext()) {
        Statement facetStmt = hidesI.next();
        Value facetsNode = facetStmt.getObject();
        if (hidesI.hasNext()) throw new UnresolvableException("More than one :hides value available");
        if (facetsNode instanceof Resource && RDFList.isRDFList(source, (Resource) facetsNode)) {
          RDFList facetRDFList = new RDFList(source, (Resource) facetsNode);
          if (facetRDFList.isValid()) {
            for (Iterator listI = facetRDFList.iterator(); listI.hasNext(); ) {
              Resource facetNode = (Resource) listI.next();
              Facet facet = new Facet(facetNode);
              out.addHide(facet);
            }
          } else {
            throw new ParsingException(facetsNode.toString() + "is not a valid rdf:List");
          }
        }
      }
      hidesI.close();
      conn.close();
View Full Code Here

Examples of eu.bitfish.jcf.parser.exception.ParsingException

   */
  public AbstractExpression parse(String query) throws ParsingException {
    try {
      return QUERY_CACHE.get(query);
    } catch (ExecutionException e) {
      throw new ParsingException(e);
    }
  }
View Full Code Here

Examples of eu.lsem.bakalarka.filetypeprocess.document.ParsingException


    private String getDocumentParserClassName(String extension) throws ParsingException {
        String className = configuration.getString("document.parser." + extension, null);
        if (className == null)
            throw new ParsingException("Document type not supported.");
        else
            return className;
    }
View Full Code Here

Examples of exception.ParsingException

        this.lookahead++;
        positive = false;
      }
     
      if (this.lookahead >= tokens.size()) {
        throw new ParsingException("unexpected token at " + tk.getInitIndex());
      }
     
      tk = tokens.get(this.lookahead);
     
      BigDecimal value = null;
      // Parses the value, depending on terminal type
      if (tk.getType() == TypeEnum.NUMBER) {
        this.lookahead++;
        value = new BigDecimal(tk.getText());
       
        if (!positive) {
          value = value.negate();
        }
       
        return value;
      } else if (tk.getType() == TypeEnum.IDENTIFIER) {
        this.lookahead++;
        value = values.get(tk.getText());
       
        if (!positive) {
          value = value.negate();
        }
       
        return value;
      } else
      // Parses subexpressions
      if (tk.getType() == TypeEnum.OPEN_BRACK) {
        this.lookahead++;
       
        value = this.exp(tokens, values);
       
        tk = tokens.get(this.lookahead);
        if (tk.getType() == TypeEnum.CLOSE_BRACK) {
          this.lookahead++;
          return value;
        }
      }
    }
   
    // Throws an error when an unexpected token is found
    throw new ParsingException("unexpected token at " + tk.getInitIndex());
  }
View Full Code Here

Examples of net.sf.rej.util.ParsingException

        default:
            byte[] asdf = parser.getBytes(32);
          logger.warning("Unsupported/invalid constantpool entry: " + tag);
            logger.warning(ByteToolkit.byteArrayToDebugString(asdf));
        }
        throw new ParsingException("Unsupported contstantpool entry: " + tag);
    }
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.