Examples of ParseException


Examples of org.soybeanMilk.core.config.parser.ParseException

  private int length;
 
  public InvokeStatementParser(String statement)
  {
    if(statement==null || statement.length()==0)
      throw new ParseException("[statement] must not be empty");
   
    this.statement=statement;
   
    this.cache=new StringBuffer();
    this.currentIdx=0;
View Full Code Here

Examples of org.springframework.expression.ParseException

          expressions.add(createLiteralExpression(context,expressionString.substring(startIdx, prefixIndex)));
        }
        int afterPrefixIndex = prefixIndex + prefix.length();
        int suffixIndex = skipToCorrectEndSuffix(prefix,suffix,expressionString,afterPrefixIndex);
        if (suffixIndex == -1) {
          throw new ParseException(expressionString, prefixIndex, "No ending suffix '" + suffix +
              "' for expression starting at character " + prefixIndex + ": " +
              expressionString.substring(prefixIndex));
        }
        if (suffixIndex == afterPrefixIndex) {
          throw new ParseException(expressionString, prefixIndex, "No expression defined within delimiter '" +
              prefix + suffix + "' at character " + prefixIndex);
        } else {
          String expr = expressionString.substring(prefixIndex + prefix.length(), suffixIndex);
          expr = expr.trim();
          if (expr.length()==0) {
            throw new ParseException(expressionString, prefixIndex, "No expression defined within delimiter '" +
                prefix + suffix + "' at character " + prefixIndex);
          }
          expressions.add(doParseExpression(expr, context));
          startIdx = suffixIndex + suffix.length();
        }
View Full Code Here

Examples of org.thechiselgroup.choosel.core.client.importer.ParseException

    @Override
    public void okay() throws ParseException {
        String pastedText = pasteArea.getText();

        if (pastedText.length() > 75000) {
            throw new ParseException(
                    "The pasted text is too big. "
                            + "This demo supports only up to 75000 characters in the pasted text.");
        }

        StringTable parsedRows = new CSVStringTableParser().parse(pastedText);

        if (parsedRows.getColumnCount() > 20) {
            throw new ParseException(
                    "Too many columns. This demo supports only up to 20 columns.");
        }
        if (parsedRows.getRowCount() > 400) {
            throw new ParseException(
                    "Too many rows. This demo supports only up to 400 rows.");
        }

        ResourceSet parsedResources = importer.createResources(parsedRows);
        parsedResources.setLabel(nameTextBox.getText());
View Full Code Here

Examples of org.tuba.exceptions.ParseException

    SAXBuilder builder = new SAXBuilder();
    try {
      Document doc = builder.build(f);
      return doc;
    } catch (JDOMException e) {
      throw new ParseException(e);
    } catch (IOException e) {
      throw new ParseException(e);
    }
  }
View Full Code Here

Examples of org.zkoss.selector.lang.Parser.ParseException

  /**
   * Add combinator to the last simple selector sequence
   * @param combinator
   */
  public void attachCombinator(Combinator combinator){
    if(isEmpty()) throw new ParseException(
        "Cannot have combinator prior to the first sequence of simple selectors.");
    get(size()-1).setCombinator(combinator);
  }
View Full Code Here

Examples of org.zkybase.cmdb.cli.ParseException

   * @see org.zkybase.cmdb.cli.Command#parse(java.lang.String[])
   */
  @Override
  public Request parse(String[] tokens) {
    if (tokens.length > 0) {
      throw new ParseException("list expects an empty list of arguments.");
    }
    return new ListRequest();
  }
View Full Code Here

Examples of ru.yandex.strictweb.ajaxtools.representation.ParseException

    if(arguments==null) throw new MethodNotArgumentized(method);
   
    Class<?>[] parameterTypes = method.getParameterTypes();
   
    int nParams = parameterTypes.length;
    if(rep.lexer.yylex() != Yytoken.TYPE_LEFT_SQUARE) throw new ParseException("Method "+method.getName()+" args["+nParams+"] expected");
   
    if(nParams == 0) {
          if(rep.lexer.yylex() != Yytoken.TYPE_RIGHT_SQUARE) throw new ParseException("Method "+method.getName()+" empty args[] expected");
        return null;
    }
   
    Type[] genericParameterTypes = method.getGenericParameterTypes();
   
    Object[] params = new Object[nParams];
       
    for(int i = 0; i < nParams; i++) {
       
      Class<?> clazz = parameterTypes[i];
      Type type = genericParameterTypes[i];
         
        if(clazz.isAssignableFrom(HttpServletRequest.class)) {
          if(rep.lexer.yylex() != Yytoken.TYPE_VALUE || rep.lexer.value != null) throw new ParseException("HttpServlet should be null");
            params[i] =  request;
        } else {
          params[i] = rep.getObject(clazz, type);
        }
       
        rep.lexer.yylex();
       
            if(i == nParams-1 && rep.lexer.type == Yytoken.TYPE_RIGHT_SQUARE) break;
      if(rep.lexer.type != Yytoken.TYPE_COMMA) throw new ParseException("no , or ] in method params");         
    }
   
        if(rep.lexer.type != Yytoken.TYPE_RIGHT_SQUARE) throw new ParseException("Method "+method.getName()+": bad args");

    return params;
  }
View Full Code Here

Examples of uk.ac.ucl.panda.utility.io.ParseException

                      addSpace(); afterTag = false;
        break;
      default:
        jj_la1[1] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
    }
    jj_consume_token(0);
  }
View Full Code Here

Examples of vmcreative.htmlparser.ParseException

     
      // Increment
      try {
        pos = childTag == null ? endPos : childTag.getEndTag().getEndPosition() + 1;
      } catch(NullPointerException q) {
        throw new ParseException("ParseException: Tag: <" + childTag.getName() + "> has no maching end tag.");
      }
      nextChild++;
    }
  }
View Full Code Here

Examples of webit.script.exceptions.ParseException

public class FunctionLoopOverflowTest {

    @Test
    public void test() throws ResourceNotFoundException, IOException {
        Template template;
        ParseException exception;
        //
        exception = null;
        template = EngineManager.getTemplate("/loopTests/loopOverflow1.wit");
        try {
            template.reload();
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.