robocraft.common
Class GameActionException
java.lang.Object
java.lang.Throwable
java.lang.Exception
robocraft.common.GameActionException
-
All Implemented Interfaces:
- java.io.Serializable
- public class GameActionException
- extends java.lang.Exception
This exception is thrown whenever a player attempts to interact
with the outside world, whether through using an active ability or
simply querying a property, and the interaction is for some reason
impossible to complete.
See "Writing a Player" in the specs for more information about
handling GameActionExceptions.
- See Also:
- Serialized Form
Constructor Summary |
GameActionException()
Gives the GameActionException the error code GENERIC_FAILURE. |
GameActionException(int errorCode)
Gives the GameActionException the error code errorCode. |
Method Summary |
int |
getErrorCode()
Returns the error code representing the reason this
GameActionException is being thrown. |
java.lang.String |
getMessage()
|
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
INTERNAL_ERROR
public static final int INTERNAL_ERROR
- An internal RoboVM or game engine exception has been thrown. A
stack trace useful to the devs is printed to System.out when
this exception is thrown.
- See Also:
- Constant Field Values
GENERIC_FAILURE
public static final int GENERIC_FAILURE
- See Also:
- Constant Field Values
INVALID_SQUARE
public static final int INVALID_SQUARE
- See Also:
- Constant Field Values
NOT_A_ROBOT
public static final int NOT_A_ROBOT
- See Also:
- Constant Field Values
OBJECT_DOESNT_EXIST
public static final int OBJECT_DOESNT_EXIST
- See Also:
- Constant Field Values
ALREADY_MOVING
public static final int ALREADY_MOVING
- See Also:
- Constant Field Values
OUT_OF_SENSOR_RANGE
public static final int OUT_OF_SENSOR_RANGE
- See Also:
- Constant Field Values
OUT_OF_ATTACK_RANGE
public static final int OUT_OF_ATTACK_RANGE
- See Also:
- Constant Field Values
CANT_ATTACK_WHILE_MOVING
public static final int CANT_ATTACK_WHILE_MOVING
- See Also:
- Constant Field Values
CANT_MOVE_THERE
public static final int CANT_MOVE_THERE
- See Also:
- Constant Field Values
ALREADY_ACTIVE
public static final int ALREADY_ACTIVE
- See Also:
- Constant Field Values
CANT_ATTACK_GROUND
public static final int CANT_ATTACK_GROUND
- See Also:
- Constant Field Values
CANT_ATTACK_AIR
public static final int CANT_ATTACK_AIR
- See Also:
- Constant Field Values
NOT_ENOUGH_ENERGON
public static final int NOT_ENOUGH_ENERGON
- See Also:
- Constant Field Values
SQUARE_NOT_EMPTY
public static final int SQUARE_NOT_EMPTY
- See Also:
- Constant Field Values
CANT_SPAWN_THAT
public static final int CANT_SPAWN_THAT
- See Also:
- Constant Field Values
BAD_DIRECTION
public static final int BAD_DIRECTION
- See Also:
- Constant Field Values
CANT_SPAWN_THERE
public static final int CANT_SPAWN_THERE
- See Also:
- Constant Field Values
CANT_LAY_MINE
public static final int CANT_LAY_MINE
- See Also:
- Constant Field Values
OBJECT_NOT_MINE
public static final int OBJECT_NOT_MINE
- See Also:
- Constant Field Values
OBJECT_NOT_FLAG
public static final int OBJECT_NOT_FLAG
- See Also:
- Constant Field Values
NOT_CARRYING_FLAG
public static final int NOT_CARRYING_FLAG
- See Also:
- Constant Field Values
NOT_AIRBORNE
public static final int NOT_AIRBORNE
- See Also:
- Constant Field Values
INVALID_MINE_POWER
public static final int INVALID_MINE_POWER
- See Also:
- Constant Field Values
ROBOT_TYPE_LIMIT_EXCEEDED
public static final int ROBOT_TYPE_LIMIT_EXCEEDED
- See Also:
- Constant Field Values
TEAM_TOTAL_LIMIT_EXCEEDED
public static final int TEAM_TOTAL_LIMIT_EXCEEDED
- See Also:
- Constant Field Values
CANT_CARRY_FLAG
public static final int CANT_CARRY_FLAG
- See Also:
- Constant Field Values
SQUARE_NOT_FREE
public static final int SQUARE_NOT_FREE
- See Also:
- Constant Field Values
GameActionException
public GameActionException(int errorCode)
- Gives the GameActionException the error code errorCode.
GameActionException
public GameActionException()
- Gives the GameActionException the error code GENERIC_FAILURE.
getErrorCode
public int getErrorCode()
- Returns the error code representing the reason this
GameActionException is being thrown.
getMessage
public java.lang.String getMessage()