Examples of ParseException


Examples of es.upv.dsic.issi.moment.maudedaemon.parser.ParseException

  public List<IMaudeJob> createJobs (String input) throws ParseException
    try {
      return createJobs(new ByteArrayInputStream(input.getBytes()));
   
    } catch (ParseException e) {
      throw new ParseException("No valid parse for " + input, e);
    }
  }
View Full Code Here

Examples of etch.compiler.ParseException

    {
      if (i instanceof FieldItem)
      {
        FieldItem fi = (FieldItem) i;
        if (!hasParameter( fi.value() ))
          throw new ParseException( String.format(
            "ToString: format list specifies parameter (%s) which does not exist at line %d",
            fi.value(), lineno ) );
      }
    }
  }
View Full Code Here

Examples of eu.planets_project.ifr.core.storage.impl.fedora.connector.ParseException

            JAXBElement unmarshalled = (JAXBElement) unmarshaller.unmarshal(planetsstream);
            PlanetsDatastreamType planetsDatastreamObject = (PlanetsDatastreamType) unmarshalled.getValue();
            return planetsDatastreamObject;

        } catch (JAXBException e) {
            throw new ParseException(e);
        }
    }
View Full Code Here

Examples of freemarker.core.ParseException

        int bidx = 0;
        StringBuffer buf = new StringBuffer(lidx);
        do {
            buf.append(s.substring(bidx, idx));
            if (idx >= lidx) {
                throw new ParseException("The last character of string literal is backslash", 0,0);
            }
            char c = s.charAt(idx + 1);
            switch (c) {
                case '"':
                    buf.append('"');
                    bidx = idx + 2;
                    break;
                case '\'':
                    buf.append('\'');
                    bidx = idx + 2;
                    break;
                case '\\':
                    buf.append('\\');
                    bidx = idx + 2;
                    break;
                case 'n':
                    buf.append('\n');
                    bidx = idx + 2;
                    break;
                case 'r':
                    buf.append('\r');
                    bidx = idx + 2;
                    break;
                case 't':
                    buf.append('\t');
                    bidx = idx + 2;
                    break;
                case 'f':
                    buf.append('\f');
                    bidx = idx + 2;
                    break;
                case 'b':
                    buf.append('\b');
                    bidx = idx + 2;
                    break;
                case 'g':
                    buf.append('>');
                    bidx = idx + 2;
                    break;
                case 'l':
                    buf.append('<');
                    bidx = idx + 2;
                    break;
                case 'a':
                    buf.append('&');
                    bidx = idx + 2;
                    break;
                case '{':
                    buf.append('{');
                    bidx = idx + 2;
                    break;
                case 'x': {
                    idx += 2;
                    int x = idx;
                    int y = 0;
                    int z = lidx > idx + 3 ? idx + 3 : lidx;
                    while (idx <= z) {
                        char b = s.charAt(idx);
                        if (b >= '0' && b <= '9') {
                            y <<= 4;
                            y += b - '0';
                        } else if (b >= 'a' && b <= 'f') {
                            y <<= 4;
                            y += b - 'a' + 10;
                        } else if (b >= 'A' && b <= 'F') {
                            y <<= 4;
                            y += b - 'A' + 10;
                        } else {
                            break;
                        }
                        idx++;
                    }
                    if (x < idx) {
                        buf.append((char) y);
                    } else {
                        throw new ParseException("Invalid \\x escape in a string literal",0,0);
                    }
                    bidx = idx;
                    break;
                }
                default:
                    throw new ParseException("Invalid escape sequence (\\" + c + ") in a string literal",0,0);
            }
            idx = s.indexOf('\\', bidx);
        } while (idx != -1);
        buf.append(s.substring(bidx));
View Full Code Here

Examples of freemarker.core.parser.ParseException

            c = skipWS();
            if (c == ' ') break;
            seq.add(fetchStringValue());
            c = skipWS();
            if (c == ' ') break;
            if (c != ',') throw new ParseException(
                    "Expected \",\" or the end of text but "
                    + "found \"" + c + "\"", 0, 0);
            p++;
        }
        return seq;
View Full Code Here

Examples of gd.xml.ParseException

        // Do nothing.
    }

    public InputStream getDocumentStream() throws ParseException {
        if (this.inStream == null) {
            throw new ParseException("Input document stream not defined.");
        }
        return this.inStream;
    }
View Full Code Here

Examples of it.halfone.exception.ParseException

      }
    } else {
      String message = "the input text doesn't match the bnf provided\ninput string was:\n";
      message += input + "\nbest parsed string was:";
      message += bestParse + "\n";
      throw new ParseException(message);
    }
    return retVal;
  }
View Full Code Here

Examples of japa.parser.ParseException

      return cu;
    } catch (UnsupportedEncodingException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    } catch (TokenMgrError e) {
      throw new ParseException(e.getMessage());
    }
    return null;
  }
View Full Code Here

Examples of java.text.ParseException

     * @return FTPFile
     * @throws ParseException
     */
    public FTPFile parse(String line) throws ParseException {
        if (parser.isMultiLine())
            throw new ParseException("Cannot use this method with multi-line parsers", 0);
        FTPFile file = null;
        try {
            file = parser.parse(line);
        }
        catch (DateParseException ex) {
View Full Code Here

Examples of javax.mail.internet.ParseException

                userSB.append(parseQuotedLocalPart(address));
            } else {
                userSB.append(parseUnquotedLocalPart(address));
            }
            if (userSB.toString().length() == 0) {
                throw new ParseException("No local-part (user account) found at position " + (pos + 1));
            }

            //find @
            if (address.charAt(pos) != '@') {
                throw new ParseException("Did not find @ between local-part and domain at position " + (pos + 1));
            }
            pos++;

            //parse domain
            //<domain> ::=  <element> | <element> "." <domain>
            //<element> ::= <name> | "#" <number> | "[" <dotnum> "]"
            while (true) {
                if (address.charAt(pos) == '#') {
                    hostSB.append(parseNumber(address));
                } else if (address.charAt(pos) == '[') {
                    hostSB.append(parseDotNum(address));
                } else {
                    hostSB.append(parseDomainName(address));
                }
                if (pos >= address.length()) {
                    break;
                }
                if (address.charAt(pos) == '.') {
                    hostSB.append('.');
                    pos++;
                    continue;
                }
                break;
            }

            if (hostSB.toString().length() == 0) {
                throw new ParseException("No domain found at position " + (pos + 1));
            }
        } catch (IndexOutOfBoundsException ioobe) {
            throw new ParseException("Out of data at position " + (pos + 1));
        }

        user = userSB.toString();
        host = hostSB.toString();
    }
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.