Examples of ParseException


Examples of org.pentaho.reporting.libraries.xmlns.parser.ParseException

  protected void startParsing(final Attributes attrs) throws SAXException
  {
    targetType = attrs.getValue(getUri(), "target-type");
    if (targetType == null)
    {
      throw new ParseException("Mandatory attribute 'target-type' is missing.", getLocator());
    }
    final String href = attrs.getValue(getUri(), "href");
    if (href == null)
    {
      throw new ParseException("Mandatory attribute 'href' is missing.", getLocator());
    }

    try
    {
      final ResourceManager resourceManager = getRootHandler().getResourceManager();
      final ResourceKey key = resourceManager.deriveKey(getRootHandler().getSource(), href);
      final Resource resource = resourceManager.create(key, null, MasterReport.class);
      report = (MasterReport) resource.getResource();
    }
    catch (ResourceException re)
    {
      throw new ParseException("Mandatory attribute 'href' is not pointing to a valid report.", re, getLocator());
    }
  }
View Full Code Here

Examples of org.pirkaengine.core.parser.ParseException

                for (String name : subTemplate.functions.keySet()) {
                    template.functions.put(name, subTemplate.functions.get(name));
                }
                return template;
            } catch (Exception e) {
                throw new ParseException(e);
            }
        } else {
            buildTemplate(template, struct, null, charset);
            return template;
        }
View Full Code Here

Examples of org.python.antlr.ParseException

                if (!e.match(Py.SyntaxWarning)) {
                    throw e;
                }
            }
        }
        throw new ParseException(msg, node);
    }
View Full Code Here

Examples of org.python.parser.ParseException

    }

    public Object visitBreak(Break node) throws Exception {
        //setline(node); Not needed here...
        if (breakLabels.empty()) {
            throw new ParseException("'break' outside loop", node);
        }

        doFinallysDownTo(bcfLevel);

        code.goto_((Label) breakLabels.peek());
View Full Code Here

Examples of org.python.pydev.parser.jython.ParseException

        int errorStart = -1;
        int errorEnd = -1;
        int errorLine = -1;
        String message = null;
        if (error instanceof ParseException) {
            ParseException parseErr = (ParseException) error;

            // Figure out where the error is in the document, and create a
            // marker for it
            if (parseErr.currentToken == null) {
                IRegion endLine = doc.getLineInformationOfOffset(doc.getLength());
                errorStart = endLine.getOffset();
                errorEnd = endLine.getOffset() + endLine.getLength();

            } else {
                Token errorToken = parseErr.currentToken.next != null ? parseErr.currentToken.next
                        : parseErr.currentToken;
                IRegion startLine = doc.getLineInformation(getDocPosFromAstPos(errorToken.beginLine));
                IRegion endLine;
                if (errorToken.endLine == 0) {
                    endLine = startLine;
                } else {
                    endLine = doc.getLineInformation(getDocPosFromAstPos(errorToken.endLine));
                }
                errorStart = startLine.getOffset() + getDocPosFromAstPos(errorToken.beginColumn);
                errorEnd = endLine.getOffset() + errorToken.endColumn;
            }
            message = parseErr.getMessage();

        } else if (error instanceof TokenMgrError) {
            TokenMgrError tokenErr = (TokenMgrError) error;
            IRegion startLine = doc.getLineInformation(tokenErr.errorLine - 1);
            errorStart = startLine.getOffset();
View Full Code Here

Examples of org.rsbot.loader.script.ParseException

        log.info("Downloading new game client");
        script = new ModScript(HttpClient.downloadBinary(new URL(Configuration.Paths.URLs.CLIENTPATCH)));
      }
      version[0] = script.getVersion();
      if (version[2] > version[0]) {
        throw new ParseException("Patch outdated (" + version[2] + " > " + version[0] + ")");
      }
      final JarFile loader = getJar(true), client = getJar(false);
      final List<String> replace = Arrays.asList(script.getAttribute("replace").split(" "));

      for (final JarFile jar : new JarFile[]{loader, client}) {
View Full Code Here

Examples of org.rythmengine.exception.ParseException

    private String initCode = null;

    public void setInitCode(String code) {
        if (null != initCode)
            throw new ParseException(engine, templateClass, parser.currentLine(), "@init section already declared.");
        initCode = code;
    }
View Full Code Here

Examples of org.semarglproject.rdf.ParseException

        if (cause instanceof ParseException) {
            error(RDFa.ERROR, cause.getMessage());
            return (ParseException) cause;
        }
        error(RDFa.ERROR, e.getMessage());
        return new ParseException(e);
    }
View Full Code Here

Examples of org.shiftone.jrat.core.ParseException

   */
  private void addMethod(String[] tokens) throws ParseException {

    // 0 METHOD, 1 index, 2 class, 3 method, 4 signature 5 END
    if (tokens.length != 6) {
      throw new ParseException("error in format of method key : " + tokens);
    }
    methodKeys.add(Integer.parseInt(tokens[1]), new MethodKey(tokens[2], tokens[3], tokens[4]));
  }
View Full Code Here

Examples of org.sindice.siren.qparser.json.ParseException

  Integer parse() throws ParseException {
    final JsonNode value = node.path(LEVEL_PROPERTY);
    if (value.isInt()) {
      return value.asInt();
    }
    throw new ParseException("Invalid property '" + LEVEL_PROPERTY + "': value is not an integer");
  }
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.