This actor tests for exceptions that are expected to occur when
running a test model. When an exception is
thrown by the model, this actor is invoked. It has two
working modes, training mode and non-training mode. If in training mode,
this actor handles an exception by recording the exception message. If
not in training mode, this actor first compares the previously stored
(assumed correct) message to the exception message and then throws an
exception if the two messages are not the same.
Also, if a test runs to completion without throwing an exception, this actor
throws an exception in its wrapup() method. An exception is expected.
Edward A. Lee
$Id: TestExceptionAttribute.java 70402 2014-10-23 00:52:20Z cxh $
Ptolemy II 10.0
Yellow (hyzheng)
Yellow (hyzheng)
The correct exception message to be compared against.
If greater than zero, then check that the first <i>n</i>
characters of the exception message match, where <i>n</i>
is the value of this parameter. Otherwise, if this is zero
or negative, then check all the characters. This is an
integer that defaults to zero.
If true, then collect the exception message and set the
correctExceptionMessage parameter with the content of the
exception. This parameter is a boolean, and it defaults to false.
It is a shared parameter, meaning
that changing it for any one instance in a model will change
it for all instances in the model.