Examples of ParserException


Examples of com.poker.analyst.parse.ParserException

        Board boardPrevNew = null;
              
        //getting buffer
        strBuffer = getConsoleBuffer(pdata, playWnd);
        parserResult = bufferParser.getParserResult(strBuffer,null);
        if (parserResult == null) throw new ParserException();
       
        if (parserResult.getCurrentRound() != Rounds.PREFLOP){
          boardPrevNew = createBoardShablon(pdata);
          switch (parserResult.getCurrentRound()) {
      case FLOP:
        parserResultPrev = bufferParser.getParserResult(strBuffer,Rounds.PREFLOP);
        break;
      case TURN:
        parserResultPrev = bufferParser.getParserResult(strBuffer,Rounds.FLOP);
        break;
      case RIVER:
        parserResultPrev = bufferParser.getParserResult(strBuffer,Rounds.TURN);
        break;       
      }        
          if (parserResultPrev == null) throw new ParserException();
        }           
        playWnd.setCurrentRound(parserResult.getCurrentRound());
          
        BufferedImage[] hStacks = getStacksImages(pdata, playWnd);
        hStacks = getPreparedStacksImages(pdata, hStacks, 2);
View Full Code Here

Examples of com.salesforce.omakase.parser.ParserException

                    Source source = new Source(evaluated.toString(), raw.line(), raw.column());
                    ParserFactory.termSequenceParser().parse(source, broadcaster, refiner);
                }
            }
        } catch (QuickFixException e) {
            throw new ParserException(e);
        }

        return true;
    }
View Full Code Here

Examples of com.trikke.exception.ParserException

          }
          table.addField( type, info.get( "name" ).asString(), constraints );
        }
      } catch ( NullPointerException e )
      {
        throw new ParserException( "Couldn't parse the fields in this table." );
      }
      if ( jsontable.names().contains( "constraints" ) )
      {
        try
        {
          for ( JsonValue jsoninfo : jsontable.get( "constraints" ).asArray() )
          {
            JsonObject info = (JsonObject) jsoninfo;
            String definition = info.get( "definition" ).asString();
            if ( definition.toLowerCase().contains( "primary key" ) )
            {
              // skip if primary key already set
              if ( table.hasPrimaryKey() )
              {
                continue;
              }

              final Field field = table.getFieldByName( info.get( "name" ).asString() );
              if ( field != null )
              {
                table.setPrimaryKey( field );
              }
            }
            table.addConstraint( info.names().contains( "name" ) ? info.get( "name" ).asString() : null, definition );
          }
        } catch ( NullPointerException e )
        {
          throw new ParserException( "Couldn't parse the constraints in this table." );
        }
      }
      mModel.addTable( table );
    }
  }
View Full Code Here

Examples of com.trikke.exception.ParserException

          JsonObject info = (JsonObject) jsoninfo;
          view.addSelect( (info.names().contains( "as" )) ? info.get( "as" ).asString() : null, info.get( "select" ).asString() );
        }
      } catch ( NullPointerException e )
      {
        throw new ParserException( "Couldn't parse the selects in this view." );
      }

      try
      {
        for ( JsonValue jsoninfo : jsonview.get( "from" ).asArray() )
        {
          view.addFromTable( jsoninfo.asString() );
        }
      } catch ( NullPointerException e )
      {
        throw new ParserException( "Couldn't parse the from tables in this view." );
      }

      try
      {
        for ( JsonValue jsoninfo : jsonview.get( "on" ).asArray() )
        {
          view.addJoinOn( jsoninfo.asString() );
        }
      } catch ( NullPointerException e )
      {
        throw new ParserException( "Couldn't parse the fields on which to join in this view." );
      }
      try
      {
        if ( jsonview.names().contains( "order" ) )
        {
          for ( JsonValue jsoninfo : jsonview.get( "order" ).asArray() )
          {
            JsonObject info = (JsonObject) jsoninfo;
            view.addOrder( info.get( "by" ).asString(), (info.names().contains( "sort" )) ? info.get( "sort" ).asString() : "ASC" );
          }
        }
      } catch ( NullPointerException e )
      {
        throw new ParserException( "Couldn't parse the ordering in this view." );
      }
      try
      {
        if ( jsonview.names().contains( "group" ) )
        {
          for ( JsonValue jsoninfo : jsonview.get( "group" ).asArray() )
          {
            view.addGroup( jsoninfo.asString() );
          }
        }
      } catch ( NullPointerException e )
      {
        throw new ParserException( "Couldn't parse the grouping in this view." );
      }
      if ( jsonview.names().contains( "join" ) )
      {
        view.jointype = jsonview.get( "join" ).asString();
      }
View Full Code Here

Examples of de.ailis.jollada.exceptions.ParserException

                    // Ignored
            }
        }
        catch (final URISyntaxException e)
        {
            throw new ParserException(e.toString(), e);
        }
    }
View Full Code Here

Examples of de.zalando.typemapper.parser.exception.ParserException

            if (b.equals(falseList[i])) {
                return Boolean.FALSE;
            }
        }

        throw new ParserException("Cannot convert sting [" + s + "] to Boolean");
    }
View Full Code Here

Examples of eas.math.fundamentalAlgorithms.type2grammars.charty.nonsense.ParserException

     */
    public Set<String> getLHS(final String rhs) throws ParserException {
        final Set<String> set = safe(leftmost.get(rhs));
        set.retainAll(singletons);
        if (set.isEmpty())
            throw new ParserException("Unknown terminal '" + rhs + "'.");
        return set;
    }
View Full Code Here

Examples of eu.scape_project.planning.utils.ParserException

        } catch (SAXException e) {
            log.error("An error occurred while parsing the c3po profile: {}", e.getMessage());
        }

        if (validate && !this.isValid(parser, stream)) {
            throw new ParserException("Validation was turned on, but the xml file is not valid against the schema.");
        }

        try {
            final SAXReader reader = new SAXReader();
            this.profile = reader.read(stream);

            final Namespace namespace = this.profile.getRootElement().getNamespace();
            if (!namespace.getStringValue().equals(C3PO_NAMESPACE)) {
                throw new ParserException("Cannot parse the profile, namespace does not match");
            }
        } catch (final DocumentException e) {
            log.error("An error occurred while reading the profile: {}", e.getMessage());
            this.profile = null;
        }
View Full Code Here

Examples of hu.jokeman.xparser.parser.ParserException

  public ParserState process (int ch) throws ParserException {
        char c = (char) ch;
        DocumentBuilder builder = getDocumentBuilder ();
       
    if (_isShort && c != '>') {
      throw new ParserException ("Invalid short tag.");
    }
       
    if (XMLCharacterSet.isNameChar (c)) {
      if (_isAdded) {
        return new AttributeState (builder, this, ch);
      }
      _name.append (c);
            return this;
    }
       
        if (XMLCharacterSet.isWhiteSpace (c)) {
      if (!_isAdded) {
        builder.createTagStart (_name.toString ());
        _isAdded = true;
      }
      return this;
    }
       
        if (c == '/') {
      _isShort = true;
      return this;
    }
       
        if (c == '>') {
      if (!_isAdded) {
        builder.createTagStart (_name.toString ());
      }
      builder.finishTagStart ();
      if (_isShort) {
        builder.addTagClose (_name.toString ());
      }
      return new NormalState (builder);
    }
   
    throw new ParserException ("Illegal character '" + c + "'.");
  }
View Full Code Here

Examples of lipstone.joshua.parser.exceptions.ParserException

    //In basic types:  answer = (b-a)/(2*N)*sigma
    answer = (max.subtract(min).divide(new BigDec(N).multiply(new BigDec(2)))).multiply(sigma);
    if (answer.subtract(last).abs().doubleValue() < accuracy)
      return answer;
    else if (N >= maxN)
      throw new ParserException("The integration system ran out of time", caller);
    else
      return trapezoidal(answer, N * 2);
  }
 
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.