Examples of ParserException


Examples of org.vectomatic.dom.svg.utils.ParserException

    SVGDocument doc = null;
    try {
      doc = parseFromString(rawSvg, "text/xml").cast();
     
    } catch(JavaScriptException e) {
      throw new ParserException(ParserException.Type.NotWellFormed, e.getMessage());
    }
    Element elt = doc.getDocumentElement();
    if ("parsererror".equals(DOMHelper.getLocalName(elt))) {
      String message = "Parsing error";
      if (elt.getFirstChild() != null) {
        message = elt.getFirstChild().<Text>cast().getData();
      }
      throw new ParserException(ParserException.Type.NotWellFormed, message);
    }
    SVGSVGElement svg = DOMHelper.importNode(DOMHelper.getCurrentDocument(), elt, true).cast();
    // IE9 bug workaround: update all SVG style elements by
    // adding a trailing whitespace char, otherwise IE9 will
    // ignore them
View Full Code Here

Examples of org.webharvest.exception.ParserException

            // call parsing
            parser.parse(in, handler);

            log.info("XML parsed in " + (System.currentTimeMillis() - startTime) + "ms.");
        } catch (Exception e) {
            throw new ParserException(e.getMessage(), e);
        }

        return handler.root;
    }
View Full Code Here

Examples of org.webharvest.exception.ParserException

                result = new CompactXmlSerializer(properties).getXmlAsString(node);
            }

            return new NodeVariable(result);
        } catch (IOException e) {
            throw new ParserException(e);
        }
    }
View Full Code Here

Examples of org.yaml.snakeyaml.parser.ParserException

    @Override
    protected Map<Object, Object> constructMapping(MappingNode node) {
      try {
        return super.constructMapping(node);
      } catch (IllegalStateException e) {
        throw new ParserException("while parsing MappingNode",
            node.getStartMark(), e.getMessage(), node.getEndMark());
      }
    }
View Full Code Here

Examples of ratpack.parse.ParserException

      .map(parser -> {
        @SuppressWarnings("unchecked") Parser<O> castParser = (Parser<O>) parser;
        try {
          return castParser.parse(this, getRequest().getBody(), parse);
        } catch (Exception e) {
          throw new ParserException(parser, e);
        }
      })
      .orElseThrow(() -> new NoSuchParserException(parse.getType(), parse.getOpts(), finalRequestContentType));
  }
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.