jadex.micro.testcases.BodyExceptionAgent Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jadex-applications-micro Show documentation
Show all versions of jadex-applications-micro Show documentation
The Jadex micro applications package contains several example applications, benchmarks and testcases using micro agents.
package jadex.micro.testcases;
import jadex.commons.future.IFuture;
import jadex.micro.annotation.Agent;
import jadex.micro.annotation.AgentBody;
/**
* Test what happens if an exception is thrown in body.
*/
@Agent
public class BodyExceptionAgent
{
/**
* The agent body.
*/
@AgentBody
public IFuture executeBody()
{
// System.out.println("execute ExceptionTest ...");
throw new RuntimeException("Exception in agent body");
// System.out.println("... finished");
}
}