com.espertech.esper.epl.parse
Class ExceptionConvertor

java.lang.Object
  extended by com.espertech.esper.epl.parse.ExceptionConvertor

public class ExceptionConvertor
extends java.lang.Object

Converts recognition exceptions.


Constructor Summary
ExceptionConvertor()
           
 
Method Summary
static UniformPair<java.lang.String> convert(org.antlr.runtime.RecognitionException e, java.lang.String expression, boolean addPleaseCheck, EsperEPL2GrammarParser parser)
          Converts from a syntax error to a nice exception.
static EPStatementSyntaxException convert(org.antlr.runtime.RecognitionException e, java.lang.String expression, EsperEPL2Ast treeWalker)
          Converts from a syntax error to a nice statement exception.
static PropertyAccessException convertProperty(org.antlr.runtime.RecognitionException e, java.lang.String expression, boolean addPleaseCheck, EsperEPL2GrammarParser parser)
          Converts from a syntax error to a nice property exception.
static EPStatementSyntaxException convertStatement(org.antlr.runtime.RecognitionException e, java.lang.String expression, boolean addPleaseCheck, EsperEPL2GrammarParser parser)
          Converts from a syntax error to a nice statement exception.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExceptionConvertor

public ExceptionConvertor()
Method Detail

convertStatement

public static EPStatementSyntaxException convertStatement(org.antlr.runtime.RecognitionException e,
                                                          java.lang.String expression,
                                                          boolean addPleaseCheck,
                                                          EsperEPL2GrammarParser parser)
Converts from a syntax error to a nice statement exception.

Parameters:
e - is the syntax error
expression - is the expression text
parser - the parser that parsed the expression
addPleaseCheck - indicates to add "please check" paraphrases
Returns:
syntax exception

convertProperty

public static PropertyAccessException convertProperty(org.antlr.runtime.RecognitionException e,
                                                      java.lang.String expression,
                                                      boolean addPleaseCheck,
                                                      EsperEPL2GrammarParser parser)
Converts from a syntax error to a nice property exception.

Parameters:
e - is the syntax error
expression - is the expression text
parser - the parser that parsed the expression
addPleaseCheck - indicates to add "please check" paraphrases
Returns:
syntax exception

convert

public static UniformPair<java.lang.String> convert(org.antlr.runtime.RecognitionException e,
                                                    java.lang.String expression,
                                                    boolean addPleaseCheck,
                                                    EsperEPL2GrammarParser parser)
Converts from a syntax error to a nice exception.

Parameters:
e - is the syntax error
expression - is the expression text
parser - the parser that parsed the expression
addPleaseCheck - indicates to add "please check" paraphrases
Returns:
syntax exception

convert

public static EPStatementSyntaxException convert(org.antlr.runtime.RecognitionException e,
                                                 java.lang.String expression,
                                                 EsperEPL2Ast treeWalker)
Converts from a syntax error to a nice statement exception.

Parameters:
e - is the syntax error
expression - is the expression text
treeWalker - the tree walker that walked the tree
Returns:
syntax exception

© 2006-2011 EsperTech Inc.
All rights reserved.
Visit us at espertech.com