Overview | Package | Class | Tree | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

Class javax.speech.recognition.GrammarException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--javax.speech.SpeechException
                    |
                    +--javax.speech.recognition.GrammarException

public class GrammarException
extends SpeechException
Thrown if a problem is found with a Java Speech Grammar Format (JSGF) file or with a RuleGrammar object derived from JSGF.

Grammar problems are typically identified and fixed during application development. This class provides information that allows a debugging environment to handle the error.

The exception message is a printable string. Recognizers may optionally provide details of each syntax problem.

See Also:
Serialized Form

Constructor Summary
GrammarException()
          Constructs a GrammarException with no detail message.
GrammarException(String s)
          Constructs a GrammarException with the specified detail message.
GrammarException(String s, GrammarSyntaxDetail[] details)
          Constructs a GrammarException with the specified detail message and an optional programmatic description of each error.
 
Method Summary
void addDetail(GrammarSyntaxDetail detail)
          Add a syntax error description (appended to the existing array of details).
GrammarSyntaxDetail[] getDetails()
          Return the list of grammar syntax problem descriptions.
void setDetails(GrammarSyntaxDetail[] details)
          Set the grammar syntax problem descriptions.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait
 

Constructor Detail

GrammarException

public GrammarException()
Constructs a GrammarException with no detail message.

GrammarException

public GrammarException(String s)
Constructs a GrammarException with the specified detail message.

Parameters:
s - a printable detail message

GrammarException

public GrammarException(String s,
                        GrammarSyntaxDetail[] details)
Constructs a GrammarException with the specified detail message and an optional programmatic description of each error.

Parameters:
s - a printable detail message
detail - detail of each error encountered or null
Method Detail

getDetails

public GrammarSyntaxDetail[] getDetails()
Return the list of grammar syntax problem descriptions.

setDetails

public void setDetails(GrammarSyntaxDetail[] details)
Set the grammar syntax problem descriptions.

addDetail

public void addDetail(GrammarSyntaxDetail detail)
Add a syntax error description (appended to the existing array of details).

Overview | Package | Class | Tree | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

JavaTM Speech API
Copyright 1997-1998 Sun Microsystems, Inc. All rights reserved
Send comments to javaspeech-comments@sun.com