public class GameActionException
extends java.lang.Exception
GameActionException to be thrown.
Each GameActionException has a type that roughly identifies what
caused the exception.
In addition to GameActionException,
some robot functions can throw the unchecked exceptions
IllegalStateException and IllegalArgumentException.
An IllegalStateException is thrown if this robot can
never successfully call the function.
An IllegalArgumentException is thrown if this type of
robot can never successfully call the function with the given arguments.
A GameActionException is thrown in all other circumstances.
| Constructor and Description |
|---|
GameActionException(GameActionExceptionType type,
java.lang.String message)
Creates a GameActionException with the given type and message.
|
| Modifier and Type | Method and Description |
|---|---|
GameActionExceptionType |
getType()
Gives the type of gameworld interaction that caused this GameActionException, which
was specified when this instance was constructed.
|
public GameActionException(GameActionExceptionType type, java.lang.String message)
type - the type of the GameActionExceptionmessage - the error messagepublic GameActionExceptionType getType()