org.json.simple.parser.ParseException.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(7.0k)|赞(0)|评价(0)|浏览(151)

本文整理了Java中org.json.simple.parser.ParseException.<init>()方法的一些代码示例,展示了ParseException.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ParseException.<init>()方法的具体详情如下:
包路径:org.json.simple.parser.ParseException
类名称:ParseException
方法名:<init>

ParseException.<init>介绍

暂无

代码示例

代码示例来源:origin: com.googlecode.json-simple/json-simple

public void parse(String s, ContentHandler contentHandler, boolean isResume) throws ParseException{
  StringReader in=new StringReader(s);
  try{
    parse(in, contentHandler, isResume);
  }
  catch(IOException ie){
    /*
     * Actually it will never happen.
     */
    throw new ParseException(-1, ParseException.ERROR_UNEXPECTED_EXCEPTION, ie);
  }
}

代码示例来源:origin: com.googlecode.json-simple/json-simple

public Object parse(String s, ContainerFactory containerFactory) throws ParseException{
  StringReader in=new StringReader(s);
  try{
    return parse(in, containerFactory);
  }
  catch(IOException ie){
    /*
     * Actually it will never happen.
     */
    throw new ParseException(-1, ParseException.ERROR_UNEXPECTED_EXCEPTION, ie);
  }
}

代码示例来源:origin: com.googlecode.json-simple/json-simple

return valueStack.removeFirst();
      else
        throw new ParseException(getPosition(), ParseException.ERROR_UNEXPECTED_TOKEN, token);
      throw new ParseException(getPosition(), ParseException.ERROR_UNEXPECTED_TOKEN, token);
      throw new ParseException(getPosition(), ParseException.ERROR_UNEXPECTED_TOKEN, token);
throw new ParseException(getPosition(), ParseException.ERROR_UNEXPECTED_TOKEN, token);

代码示例来源:origin: com.googlecode.json-simple/json-simple

{ throw new ParseException(yychar, ParseException.ERROR_UNEXPECTED_CHAR, new Character(yycharat(0)));
                       throw new ParseException(yychar, ParseException.ERROR_UNEXPECTED_EXCEPTION, e);

代码示例来源:origin: com.googlecode.json-simple/json-simple

throw new ParseException(getPosition(), ParseException.ERROR_UNEXPECTED_TOKEN, token);
      throw new ParseException(getPosition(), ParseException.ERROR_UNEXPECTED_TOKEN, token);
      throw new ParseException(getPosition(), ParseException.ERROR_UNEXPECTED_TOKEN, token);
throw new ParseException(getPosition(), ParseException.ERROR_UNEXPECTED_TOKEN, token);

代码示例来源:origin: ethereum/ethereumj

throw new ParseException(0, e);

代码示例来源:origin: i2p/i2p.i2p

public Object parse(String s, ContainerFactory containerFactory) throws ParseException{
  StringReader in=new StringReader(s);
  try{
    return parse(in, containerFactory);
  }
  catch(IOException ie){
    /*
     * Actually it will never happen.
     */
    throw new ParseException(-1, ParseException.ERROR_UNEXPECTED_EXCEPTION, ie);
  }
}

代码示例来源:origin: i2p/i2p.i2p

public void parse(String s, ContentHandler contentHandler, boolean isResume) throws ParseException{
  StringReader in=new StringReader(s);
  try{
    parse(in, contentHandler, isResume);
  }
  catch(IOException ie){
    /*
     * Actually it will never happen.
     */
    throw new ParseException(-1, ParseException.ERROR_UNEXPECTED_EXCEPTION, ie);
  }
}

代码示例来源:origin: geotools/geotools

public static Coordinate createCoordinate(List ordinates) throws ParseException {
  Coordinate c = new Coordinate();
  if (ordinates.size() <= 1) {
    throw new ParseException(
        ParseException.ERROR_UNEXPECTED_EXCEPTION,
        "Too few ordinates to create coordinate");
  }
  if (ordinates.size() > 1) {
    c.x = ((Number) ordinates.get(0)).doubleValue();
    c.y = ((Number) ordinates.get(1)).doubleValue();
  }
  if (ordinates.size() > 2) {
    c.z = ((Number) ordinates.get(2)).doubleValue();
  }
  return c;
}

代码示例来源:origin: i2p/i2p.i2p

return valueStack.removeFirst();
      else
        throw new ParseException(getPosition(), ParseException.ERROR_UNEXPECTED_TOKEN, token);
      throw new ParseException(getPosition(), ParseException.ERROR_UNEXPECTED_TOKEN, token);
      throw new ParseException(getPosition(), ParseException.ERROR_UNEXPECTED_TOKEN, token);
throw new ParseException(getPosition(), ParseException.ERROR_UNEXPECTED_TOKEN, token);

代码示例来源:origin: i2p/i2p.i2p

{ throw new ParseException(yychar, ParseException.ERROR_UNEXPECTED_CHAR, new Character(yycharat(0)));
                       throw new ParseException(yychar, ParseException.ERROR_UNEXPECTED_EXCEPTION, e);

代码示例来源:origin: i2p/i2p.i2p

throw new ParseException(getPosition(), ParseException.ERROR_UNEXPECTED_TOKEN, token);
      throw new ParseException(getPosition(), ParseException.ERROR_UNEXPECTED_TOKEN, token);
      throw new ParseException(getPosition(), ParseException.ERROR_UNEXPECTED_TOKEN, token);
throw new ParseException(getPosition(), ParseException.ERROR_UNEXPECTED_TOKEN, token);

代码示例来源:origin: fangyidong/json-simple

public void parse(String s, ContentHandler contentHandler, boolean isResume) throws ParseException{
  StringReader in=new StringReader(s);
  try{
    parse(in, contentHandler, isResume);
  }
  catch(IOException ie){
    /*
     * Actually it will never happen.
     */
    throw new ParseException(-1, ParseException.ERROR_UNEXPECTED_EXCEPTION, ie);
  }
}

代码示例来源:origin: childe/hangout

public Object parse(String s, ContainerFactory containerFactory) throws ParseException{
  StringReader in=new StringReader(s);
  try{
    return parse(in, containerFactory);
  }
  catch(IOException ie){
    /*
     * Actually it will never happen.
     */
    throw new ParseException(-1, ParseException.ERROR_UNEXPECTED_EXCEPTION, ie);
  }
}

代码示例来源:origin: fangyidong/json-simple

public Object parse(String s, ContainerFactory containerFactory) throws ParseException{
  StringReader in=new StringReader(s);
  try{
    return parse(in, containerFactory);
  }
  catch(IOException ie){
    /*
     * Actually it will never happen.
     */
    throw new ParseException(-1, ParseException.ERROR_UNEXPECTED_EXCEPTION, ie);
  }
}

代码示例来源:origin: childe/hangout

public void parse(String s, ContentHandler contentHandler, boolean isResume) throws ParseException{
  StringReader in=new StringReader(s);
  try{
    parse(in, contentHandler, isResume);
  }
  catch(IOException ie){
    /*
     * Actually it will never happen.
     */
    throw new ParseException(-1, ParseException.ERROR_UNEXPECTED_EXCEPTION, ie);
  }
}

代码示例来源:origin: pstehlik/gelf4j

public void parse(String s, ContentHandler contentHandler, boolean isResume) throws ParseException{
  StringReader in=new StringReader(s);
  try{
    parse(in, contentHandler, isResume);
  }
  catch(IOException ie){
    /*
     * Actually it will never happen.
     */
    throw new ParseException(-1, ParseException.ERROR_UNEXPECTED_EXCEPTION, ie);
  }
}

代码示例来源:origin: pstehlik/gelf4j

public Object parse(String s, ContainerFactory containerFactory) throws ParseException{
  StringReader in=new StringReader(s);
  try{
    return parse(in, containerFactory);
  }
  catch(IOException ie){
    /*
     * Actually it will never happen.
     */
    throw new ParseException(-1, ParseException.ERROR_UNEXPECTED_EXCEPTION, ie);
  }
}

代码示例来源:origin: GoMint/ProxProx

/**
 * Parses the specified JSON string and ensures it is a JSONObject.
 *
 * @param jwt The string to parse
 * @return The parsed JSON object on success
 * @throws ParseException Thrown if the given JSON string is invalid or does not start with a JSONObject
 */
protected JSONObject parseJwtString( String jwt ) throws ParseException {
  Object jsonParsed = new JSONParser().parse( jwt );
  if ( jsonParsed instanceof JSONObject ) {
    return (JSONObject) jsonParsed;
  } else {
    throw new ParseException( ParseException.ERROR_UNEXPECTED_TOKEN );
  }
}

代码示例来源:origin: aerospike/aerospike-loader

private void validateNColumnInDataline() throws ParseException {
  
  // Throw exception if n_columns(datafile) are more than n_columns(configfile).
  int n_column = Integer.parseInt(dsvConfigs.get(Constants.N_COLUMN));
  if (columns.size() == n_column) {
    return;
  }
  if (columns.size() < n_column) {
    log.warn("File: " + Utils.getFileName(fileName) + " Line: " + lineNumber
        + " Number of column mismatch:Columns in data file is less than number of column in config file.");
  } else {
    throw new ParseException(lineNumber);
  }
}

相关文章