Class ForestException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.nineml.coffeegrinder.exceptions.CoffeeGrinderException
-
- org.nineml.coffeegrinder.exceptions.ForestException
-
- All Implemented Interfaces:
java.io.Serializable
public class ForestException extends CoffeeGrinderException
Exceptions that arise processing the shared packed parse forest (SPPF).These are generally caused by errors in how the API is used.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ForestException(java.lang.String code, java.lang.String message)An SPPF exception with a message.ForestException(java.lang.String code, java.lang.String message, java.lang.Throwable cause)An SPPF exception with an underlying cause.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ForestExceptioncannotAddChild(java.lang.String node)A cannot-add-child exception.static ForestExceptionioError(java.lang.String filename, java.lang.Exception ex)An I/O exception.static ForestExceptionnoSuchNode(java.lang.String node)A no-such-node exception.-
Methods inherited from class org.nineml.coffeegrinder.exceptions.CoffeeGrinderException
getCode
-
-
-
-
Constructor Detail
-
ForestException
public ForestException(java.lang.String code, java.lang.String message)An SPPF exception with a message.- Parameters:
code- the codemessage- the message
-
ForestException
public ForestException(java.lang.String code, java.lang.String message, java.lang.Throwable cause)An SPPF exception with an underlying cause.- Parameters:
code- the codemessage- the messagecause- the cause
-
-
Method Detail
-
ioError
public static ForestException ioError(java.lang.String filename, java.lang.Exception ex)
An I/O exception.- Parameters:
filename- filename being accessed at the time of errorex- the underlying exception- Returns:
- a ForestException
-
noSuchNode
public static ForestException noSuchNode(java.lang.String node)
A no-such-node exception.This is an internal error.
- Parameters:
node- The node.- Returns:
- A ForestException
-
cannotAddChild
public static ForestException cannotAddChild(java.lang.String node)
A cannot-add-child exception.This is an internal error.
- Parameters:
node- The node.- Returns:
- A ForestException
-
-