Examples of ParsingException


Examples of org.maltparserx.parser.ParsingException

    setAlgorithm(parsingAlgorithm);
  }
 
  public void initialize(Object[] arguments) throws MaltChainedException {
    if (arguments.length != 1) {
      throw new ParsingException("Could not initialize "+this.getClass().getName()+": number of arguments are not correct. ");
    }
    if (!(arguments[0] instanceof Integer)) {
      throw new ParsingException("Could not initialize "+this.getClass().getName()+": the first argument is not an integer. ");
    }
   
    setIndex(((Integer)arguments[0]).intValue());
  }
View Full Code Here

Examples of org.maltparserx.parser.ParsingException

    update((PlanarConfig)parsingAlgorithm.getCurrentParserConfiguration());
  }
 
  public void update(Object[] arguments) throws MaltChainedException {
    if (arguments.length != 1 || !(arguments[0] instanceof PlanarConfig)) {
      throw new ParsingException("Arguments to the planar address function is not correct. ");
    }
    update((PlanarConfig)arguments[0]);
  }
View Full Code Here

Examples of org.maltparserx.parser.ParsingException

    setAlgorithm(parsingAlgorithm);
  }
 
  public void initialize(Object[] arguments) throws MaltChainedException {
    if (arguments.length != 1) {
      throw new ParsingException("Could not initialize "+this.getClass().getName()+": number of arguments are not correct. ");
    }
    if (!(arguments[0] instanceof Integer)) {
      throw new ParsingException("Could not initialize "+this.getClass().getName()+": the first argument is not an integer. ");
    }
   
    setIndex(((Integer)arguments[0]).intValue());
  }
View Full Code Here

Examples of org.maltparserx.parser.ParsingException

    update((TwoPlanarConfig)parsingAlgorithm.getCurrentParserConfiguration());
  }
 
  public void update(Object[] arguments) throws MaltChainedException {
    if (arguments.length != 1 || !(arguments[0] instanceof TwoPlanarConfig)) {
      throw new ParsingException("Arguments to the two-planar address function are not correct. ");
    }
    update((TwoPlanarConfig)arguments[0]);
  }
View Full Code Here

Examples of org.maltparserx.parser.ParsingException

    setAlgorithm(parsingAlgorithm);
  }
 
  public void initialize(Object[] arguments) throws MaltChainedException {
    if (arguments.length != 1) {
      throw new ParsingException("Could not initialize "+this.getClass().getName()+": number of arguments are not correct. ");
    }
    if (!(arguments[0] instanceof Integer)) {
      throw new ParsingException("Could not initialize "+this.getClass().getName()+": the first argument is not an integer. ");
    }
   
    setIndex(((Integer)arguments[0]).intValue());
  }
View Full Code Here

Examples of org.modeshape.common.text.ParsingException

                            }
                        }
                        if (!foundClosingQuote) {
                            String msg = CommonI18n.noMatchingDoubleQuoteFound.text(startingPosition.getLine(),
                                                                                    startingPosition.getColumn());
                            throw new ParsingException(startingPosition, msg);
                        }
                        endIndex = input.index() + 1; // beyond last character read
                        tokens.addToken(startingPosition, startIndex, endIndex, DOUBLE_QUOTED_STRING);
                        break;
                    case '\u2019': // '’':
                    case '\'':
                        char quoteChar = c;
                        startIndex = input.index();
                        startingPosition = input.position(startIndex);
                        foundClosingQuote = false;
                        while (input.hasNext()) {
                            c = input.next();
                            if (c == '\\' && input.isNext(quoteChar)) {
                                c = input.next(); // consume the ' character since it is escaped
                            } else if (c == quoteChar) {
                                foundClosingQuote = true;
                                break;
                            }
                        }
                        if (!foundClosingQuote) {
                            String msg = CommonI18n.noMatchingSingleQuoteFound.text(startingPosition.getLine(),
                                                                                    startingPosition.getColumn());
                            throw new ParsingException(startingPosition, msg);
                        }
                        endIndex = input.index() + 1; // beyond last character read
                        tokens.addToken(startingPosition, startIndex, endIndex, SINGLE_QUOTED_STRING);
                        break;
                    case '/':
View Full Code Here

Examples of org.newdawn.slick.svg.ParsingException

        float y = Float.parseFloat(tokenY);
       
        poly.addPoint(x,y);
        count++;
      } catch (NumberFormatException e) {
        throw new ParsingException(element.getAttribute("id"), "Invalid token in points list", e);
      }
    }
   
    return count;
  }
View Full Code Here

Examples of org.newdawn.slick.svg.ParsingException

    }
   
    try {
      return Float.parseFloat(cx);
    } catch (NumberFormatException e) {
      throw new ParsingException(element, "Invalid value for: "+attr, e);
    }
  }
View Full Code Here

Examples of org.openhab.binding.insteonplm.internal.utils.Utils.ParsingException

            messageMap.put(msgDef.getKey(), msgDef.getValue());
          }
        }
      }
    } catch (SAXException e) {
      throw new ParsingException("Failed to parse XML!", e);
    } catch (ParserConfigurationException e) {
      throw new ParsingException("Got parser config exception! ", e);
    }
    return messageMap;
  }
View Full Code Here

Examples of org.ow2.util.ee.metadata.common.impl.xml.parsing.ParsingException

        // Get XML entry
        URL easybeansXmlURL = null;
        try {
            easybeansXmlURL = archive.getResource(EASYBEANS_DD_ENTRY);
        } catch (ArchiveException e) {
            throw new ParsingException("Cannot get resource '" + EASYBEANS_DD_ENTRY + "' on the archive '"
                    + archive.getName() + "'.");
        }

        EasyBeansDD easyBeansDD = null;
        if (easybeansXmlURL != null) {
            easyBeansDD = new EasyBeansDD();
            XMLConfiguration xmlConfiguration = new XMLConfiguration(easybeansXmlURL, "easybeans-mapping.xml");
            try {
                xmlConfiguration.configure(easyBeansDD);
            } catch (XMLConfigurationException e) {
                throw new ParsingException(
                        "Cannot create the object representing EasyBeans specific Deployment Descriptor", e);
            }
        }
        return easyBeansDD;
    }
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.