public class CompilerException extends GrammarException
Compiler exceptions identify problems encountered attempting to compile a grammar or parse a compiled grammar.
| Constructor and Description | 
|---|
CompilerException(java.lang.String code,
                 java.lang.String message)
Grammar exception with a message. 
 | 
CompilerException(java.lang.String code,
                 java.lang.String message,
                 java.lang.Throwable cause)
Grammar exception with an underlying cause. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
static CompilerException | 
checkumFailed()
Raised if the compiled grammar checksum doesn't match the computed value. 
 | 
static CompilerException | 
errorReadingGrammar(java.lang.String message)
Raised if an error occurs reading the grammar 
 | 
static CompilerException | 
invalidGramamr(java.lang.String message)
Raised if the grammar is invalid. 
 | 
static CompilerException | 
invalidNameEscaping(java.lang.String escape,
                   java.lang.String name)
Raised if a name is improperly escaped. 
 | 
static CompilerException | 
messageDigestError(java.lang.String hash,
                  java.lang.String reason)
Raised if the digest cannot be created. 
 | 
static CompilerException | 
missingAttributeGroup(java.lang.String id)
Raised if an attribute group is missing 
 | 
static CompilerException | 
missingXmlId(java.lang.String name)
Raised if an element is missing a required xml:id 
 | 
static CompilerException | 
notAGrammar(java.lang.String namespace)
Raised if the compiled grammar is not in the correct namespace. 
 | 
static CompilerException | 
noVersionProvided()
Raised if the compiled grammar has no version attribute. 
 | 
static CompilerException | 
textNotAllowed(java.lang.String text)
Raised if text is used where it isn't allowed. 
 | 
static CompilerException | 
unexpectedCharacterSet(java.lang.String charset)
Raised if an unexpected character set is used. 
 | 
static CompilerException | 
unexpectedElement(java.lang.String name)
Raised if the compiled grammar contains an element with an unexpected name. 
 | 
static CompilerException | 
unexpectedFlag(java.lang.String flag)
Raised if the internal flag value is unrecognized. 
 | 
static CompilerException | 
unexpectedTerminalTokenClass(java.lang.String tokenClass)
Raised if an unexpected terminal token class is encountered 
 | 
static CompilerException | 
unsupportedVersion(java.lang.String version)
Raised if the version is unrecognized. 
 | 
grammarIsClosed, invalidCharacterClass, invalidGrammarRegexgetCodepublic CompilerException(java.lang.String code,
                         java.lang.String message)
code - the codemessage - the messagepublic CompilerException(java.lang.String code,
                         java.lang.String message,
                         java.lang.Throwable cause)
code - the codemessage - the messagecause - the causepublic static CompilerException messageDigestError(java.lang.String hash, java.lang.String reason)
This should never happen.
hash - the hashreason - the underlying exception messagepublic static CompilerException unexpectedCharacterSet(java.lang.String charset)
charset - the characterset.public static CompilerException unexpectedTerminalTokenClass(java.lang.String tokenClass)
tokenClass - the token classpublic static CompilerException invalidNameEscaping(java.lang.String escape, java.lang.String name)
escape - The invalid escapename - The full namepublic static CompilerException errorReadingGrammar(java.lang.String message)
message - a detail messagepublic static CompilerException notAGrammar(java.lang.String namespace)
namespace - the root element namespacepublic static CompilerException unexpectedElement(java.lang.String name)
name - the element namepublic static CompilerException noVersionProvided()
public static CompilerException unsupportedVersion(java.lang.String version)
version - the version.public static CompilerException checkumFailed()
public static CompilerException missingXmlId(java.lang.String name)
name - the name of the elementpublic static CompilerException missingAttributeGroup(java.lang.String id)
id - the id of the grouppublic static CompilerException unexpectedFlag(java.lang.String flag)
flag - the flag valuepublic static CompilerException invalidGramamr(java.lang.String message)
message - a detail messagepublic static CompilerException textNotAllowed(java.lang.String text)
text - the text