Examples of ParseException


Examples of com.salesforce.phoenix.parse.ParseException

      return true;
    }
    // Use Codec to prevent Integer object allocation
    int index = PDataType.INTEGER.getCodec().decodeInt(ptr, indexExpr.getColumnModifier());
    if(index < 0) {
      throw new ParseException("Index cannot be negative :" + index);
    }
    Expression arrayExpr = children.get(0);
    if (!arrayExpr.evaluate(tuple, ptr)) {
      return false;
    } else if (ptr.getLength() == 0) {
View Full Code Here

Examples of com.stuffwithstuff.bantam.ParseException

*/
public class AssignParselet implements InfixParselet {
  public Expression parse(Parser parser, Expression left, Token token) {
    Expression right = parser.parseExpression(Precedence.ASSIGNMENT - 1);
   
    if (!(left instanceof NameExpression)) throw new ParseException(
        "The left-hand side of an assignment must be a name.");
   
    String name = ((NameExpression)left).getName();
    return new AssignExpression(name, right);
  }
View Full Code Here

Examples of com.sun.tools.internal.ws.wsdl.framework.ParseException

                serviceDescriptor = resolver.resolve(new URI(systemId));
                //we got the ServiceDescriptor, now break
                if (serviceDescriptor != null)
                    break;
            } catch (URISyntaxException e) {
                throw new ParseException(e);
            }
        }

        if (serviceDescriptor != null) {
            errorReceiver.warning(new SAXParseException(WsdlMessages.TRY_WITH_MEX(ex.getMessage()), null, ex));
View Full Code Here

Examples of com.sun.tools.ws.wsdl.framework.ParseException

                serviceDescriptor = resolver.resolve(new URI(systemId));
                //we got the ServiceDescriptor, now break
                if (serviceDescriptor != null)
                    break;
            } catch (URISyntaxException e) {
                throw new ParseException(e);
            }
        }

        if (serviceDescriptor != null) {
            errorReceiver.warning(new SAXParseException(WsdlMessages.TRY_WITH_MEX(ex.getMessage()), null, ex));
View Full Code Here

Examples of com.vaadin.sass.internal.parser.ParseException

            if (parent instanceof ScssStylesheet) {
                styleSheet = (ScssStylesheet) parent;
            }
        }
        if (styleSheet == null) {
            throw new ParseException("Nested import in an invalid context");
        }
        ArrayList<Node> c = new ArrayList<Node>(node.getChildren());
        for (Node n : c) {
            if (n instanceof ImportNode) {
                ImportNode importNode = (ImportNode) n;
                if (!importNode.isPureCssImport()) {
                    try {
                        StringBuilder filePathBuilder = new StringBuilder(
                                styleSheet.getFileName());
                        filePathBuilder.append(File.separatorChar).append(
                                importNode.getUri());
                        if (!filePathBuilder.toString().endsWith(".scss")) {
                            filePathBuilder.append(".scss");
                        }

                        // set parent's charset to imported node.
                        ScssStylesheet imported = ScssStylesheet.get(
                                filePathBuilder.toString(),
                                styleSheet.getCharset());
                        if (imported == null) {
                            imported = ScssStylesheet.get(importNode.getUri());
                        }
                        if (imported == null) {
                            throw new FileNotFoundException(importNode.getUri()
                                    + " (parent: "
                                    + ScssStylesheet.get().getFileName() + ")");
                        }

                        traverse(imported);

                        String prefix = getUrlPrefix(importNode.getUri());
                        if (prefix != null) {
                            updateUrlInImportedSheet(imported, prefix);
                        }

                        node.appendChildrenAfter(
                                new ArrayList<Node>(imported.getChildren()),
                                importNode);
                        node.removeChild(importNode);
                    } catch (CSSException e) {
                        e.printStackTrace();
                    } catch (IOException e) {
                        e.printStackTrace();
                    }
                } else {
                    if (styleSheet != node) {
                        throw new ParseException(
                                "CSS imports can only be used at the top level, not as nested imports. Within style rules, use SCSS imports.");
                    }
                }
            }
        }
View Full Code Here

Examples of com.vividsolutions.jts.io.ParseException

    try {
      return readGeometryTaggedText();
    }
    catch (IOException e) {
      throw new ParseException(e.toString());
    }
  }
View Full Code Here

Examples of de.fuberlin.wiwiss.r2r.parser.ParseException

      public void recover(IntStream input, RecognitionException re) {
        String hdr = getErrorHeader(re);
        String msg = getErrorMessage(re, this.getTokenNames());
       
        throw new ParseException(hdr + " " + msg);
      }
View Full Code Here

Examples of de.mhus.lib.parser.ParseException

   
    ParseReader pr;
    try {
      pr = new ParseReader(sr);
    } catch (IOException e) {
      throw new ParseException(e);
    }
    root.parse(pr);
   
    return new CompiledString(new StringPart[] {root});
  }
View Full Code Here

Examples of de.nava.informa.core.ParseException

      Document doc = saxBuilder.build(inpSource);
      ChannelIF channel = parse(cBuilder, doc);
      channel.setLocation(baseLocation);
      return channel;
    } catch (JDOMException e) {
      throw new ParseException("Problem parsing " + inpSource.getSystemId() + ": "+ e);
    }
  }
View Full Code Here

Examples of dk.brics.relaxng.converter.ParseException

      for (Map.Entry<String,String> e : m1.entrySet())
        types.put(e.getKey(), m3.get(m2.get(e.getValue())));
    } else if (u.endsWith(".rrng") || u.endsWith(".rng")) {
      Grammar rrng = rngparser.parse(url);
      if (!rrng.check(System.err))
        throw new ParseException("Schema is not Restricted RELAX NG " + url);
      if (extend)
        rrng2xg.extend(rrng);
      else
        xg = rrng2xg.convert(rrng);
      Map<String,String> m1 = rngparser.getTopLevelNewNames();
      Map<String,SequenceNode> m2 = rrng2xg.getDefineNodes();
      for (Map.Entry<String,String> e : m1.entrySet())
        types.put(e.getKey(), m2.get(e.getValue()));
    } else
      throw new ParseException("Unrecognized schema type " + url);
    if (extend)
      return types;
    else {
      schemas.add(new ConvertedSchema(xg, types));
      return null;
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.