If an activity directive throws an exception while executing, the offending directive id will now be included in the data part of the reason under the executingDirectiveId key.
This was accomplished by wrapping exceptions raised while stepping tasks in a SpanException. When this exception is caught, the driver will attempt to get the directiveId from that span before rewrapping the exception into a SimulationException, providing this id if it was found. Additionally, when a SimulationException is returned as the reason for a SimFailure, the message field is now populated with the exceptions message;
Verification
The SimulationExceptionResponse tests were added.
In order to support these tests, the foo mission model gained a simulation configuration parameter and a new activity type.
The raiseException parameter will trigger a daemon task that throws a runtime exception 1hr in a plan if enabled
The DaemonCheckerSpawner will call a DaemonCheckerActivity after spawnDelay minutes have passed, allowing us to throw runtime exceptions on demand/see the interaction between child activities and daemon tasks.
Documentation
No docs need to be updated.
Future work
Posting the failed sim results to the DB
Returning more information about the executing directive (ie name, the lineage from the source directive if it was a child that threw)
If a daemon task throws an exception, is there anything we can return?
Description
If an activity directive throws an exception while executing, the offending directive id will now be included in the
data
part of thereason
under theexecutingDirectiveId
key.This was accomplished by wrapping exceptions raised while stepping tasks in a
SpanException
. When this exception is caught, the driver will attempt to get thedirectiveId
from that span before rewrapping the exception into aSimulationException
, providing this id if it was found. Additionally, when a SimulationException is returned as thereason
for a SimFailure, themessage
field is now populated with the exceptions message;Verification
The
SimulationExceptionResponse
tests were added.In order to support these tests, the foo mission model gained a simulation configuration parameter and a new activity type.
raiseException
parameter will trigger a daemon task that throws a runtime exception 1hr in a plan if enabledDaemonCheckerSpawner
will call aDaemonCheckerActivity
afterspawnDelay
minutes have passed, allowing us to throw runtime exceptions on demand/see the interaction between child activities and daemon tasks.Documentation
No docs need to be updated.
Future work