Name

adams.flow.control.TryCatch


Synopsis

Safe-guards the execution of the 'try' sequence of actors. In case of an error, the 'catch' sequence is executed to generate output instead.
This works similar to the Java try-catch-block. Allowing the flow to recover from unexpected errors and, for instance, return default values.
If the 'try' block fails and the 'catch' block accepts input (doesn't have to be a transformer, it can be just a source, eg SequenceSource), then the same input token is presented to the 'catch' block. This allows you to react to errors better. E.g., if the input token is a filename, then you can create an error message made up of the recorded error and the filename and pass this on.
Note for developers: If actors use other actors internally, these need to be accessible. This can be achieved by simply implementing the adams.flow.core.InternalActorHandler interface.


Additional information

Flow input/output:
- input: adams.flow.core.Unknown
- output: adams.flow.core.Unknown
Actor handler information:
- Standalones allowed: false
- Source allowed: true
- Forwards input: true


See also

Options