eishub / eis

The Environment Interface Standard (EIS) is a Java-based interface standard for connecting agents to controllable entities in an environment such as a game. The interface provides support for managing the connection (e.g., for pausing and terminating an environment) and for interaction between agents and entities that are available in an environment (e.g., bots in a game). An agent that is connected to a controllable entity receives percepts from and can send actions to that entity. Percepts inform the agent about the state of the entity and its environment. Actions tell the entity which actions to perform in its environment. Several example implementations of environments are available @github.com/eishub. A default implementation of the EIS interface is also provided.
GNU General Public License v3.0
9 stars 4 forks source link

exception in performEntityAction causes AssertionError #23

Closed Wouter1 closed 10 years ago

Wouter1 commented 10 years ago

In case of an exception while executing an action (eg, Nullpointer, IndexOutOfRange, etc) the EIDefaultImpl catches it and throws an AssertionError

{{{ if ( !(e instanceof ActException) ) { e.printStackTrace(); throw new AssertionError("must be an instance of ActException"); } }}}

The catch/rethrow mechanism itself is OK (to ensure we always throw ActException) but

Wouter1 commented 10 years ago

fixed by just re-throwing to ActException with enclosed exception as cause.