Examples of ParseException


Examples of org.apache.abdera.parser.ParseException

    ParserOptions options)
      throws ParseException {
    try {
      return parser.parse(getInputStream(), getUri(), options);
    } catch (Exception e) {
      throw new ParseException(e);
    }
  }
View Full Code Here

Examples of org.apache.activemq.protobuf.compiler.parser.ParseException

//        return sb.toString();
       
        try {
            return TextFormat.unescapeText(token.image.substring(1, token.image.length()-1));
        } catch (InvalidEscapeSequence e) {
            throw new ParseException("Invalid string litteral at line " + token.next.beginLine + ", column " + token.next.beginColumn+": "+e.getMessage());
        }
    }
View Full Code Here

Examples of org.apache.batik.parser.ParseException

    public StyleAttributeParser(String s)
        throws ParseException {
        try {
            parser = (Parser)Class.forName(s).newInstance();
        } catch (Exception e) {
            throw new ParseException
                (formatMessage("creation.exception",
                               new Object[] { e.getMessage() }),
                 e);
        }
    }
View Full Code Here

Examples of org.apache.cassandra.cql.compiler.parse.ParseException

        {
            queryTree = (CommonTree)(parser.root().getTree());
        }
        catch (RecognitionException e)
        {
            throw new ParseException(parser.getErrors());           
        }
        catch (RewriteEmptyStreamException e)
        {
            throw new ParseException(parser.getErrors());           
        }

        if (!parser.getErrors().isEmpty())
        {
            throw new ParseException(parser.getErrors());
        }

        if (!parser.errors.isEmpty())
        {
            throw new ParseException("parser error");
        }

        // Semantic analysis and code-gen.
        // Eventually, I anticipate, I'll be forking these off into two separate phases.
        return SemanticPhase.doSemanticAnalysis(queryTree);
View Full Code Here

Examples of org.apache.commons.cli.ParseException

    try {
      return Integer.parseInt(portString);
    }
    catch (NumberFormatException e) {
      throw new ParseException("Invalid port number '" + portString + "'");
    }
  }
View Full Code Here

Examples of org.apache.commons.jexl.parser.ParseException

        synchronized (parser) {
            log.debug("Parsing script: " + cleanText);
            try {
                script = parser.parse(new StringReader(cleanText));
            } catch (TokenMgrError tme) {
                throw new ParseException(tme.getMessage());
            }
        }
        if (script instanceof ASTJexlScript) {
            return new ScriptImpl(cleanText, (ASTJexlScript) script);
        } else {
View Full Code Here

Examples of org.apache.derby.impl.sql.compile.ParseException

      statementNode = callStatement();
      break;
    default:
      jj_la1[0] = jj_gen;
      jj_consume_token(-1);
      throw new ParseException();
    }
                {if (true) return statementNode;}
    throw new Error("Missing return statement in function");
  }
View Full Code Here

Examples of org.apache.etch.compiler.ParseException

    if (hasExtends())
    {
      Named<?> n = parent().get( xtnds.name );
     
      if (n == null)
        throw new ParseException( String.format(
          "struct %s extends %s not defined at line %d",
          name(), xtnds.name(), xtnds.token.beginLine ) );
     
      if (!(n instanceof Struct))
        throw new ParseException( String.format(
          "struct %s extends %s not a struct at line %d",
          name(), xtnds.name(), xtnds.token.beginLine ) );
     
      Struct s = this;
      while (s != null && s.hasExtends())
      {
        s = s.getExtends();
        if (s == this)
          throw new ParseException( String.format(
            "struct %s extends %s creates loop at line %d",
            name(), xtnds.name(), xtnds.token.beginLine ) );
      }
     
      s = getExtends();
      for (Parameter p: this)
      {
        Parameter x = s.getParameter( p.name().name );
        if (x != null)
          throw new ParseException( String.format(
            "struct %s extends %s hides parameter %s from %s at line %d",
            name(), xtnds.name(), x.name(), x.parent().name(),
            xtnds.token.beginLine ) );
      }
    }
View Full Code Here

Examples of org.apache.felix.ipojo.parser.ParseException

            dict.put("instance.name", name);
        }

        String comp = instance.getAttribute("component");
        if (comp == null) {
            throw new ParseException("An instance does not have the 'component' attribute");
        } else {
            dict.put("component", comp);
        }

        Element[] props = instance.getElements("property");
View Full Code Here

Examples of org.apache.felix.scr.impl.parser.ParseException

                        { localName, m_bundle.getLocation() }, null, null, null );
                }
            }
            catch ( Exception ex )
            {
                throw new ParseException( "Exception during parsing", ex );
            }
        }

        // unexpected namespace (except the root element "components"
        // used by the Maven SCR Plugin, which is just silently ignored)
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.