Our application guideline has a very detailled description regarding error behaviour.
Summary:
Avoid to abort chains with ERROR:
Do not use _env.ChainControl:=ERROR, but implement an error behaviour (see example project Digital Machine, update to latest bundle release is ongoing).
Do not use SetEvent(OpconEventClass.ERROR, ...), but SetEvent(OpconEventClass.SOFTERROR, ...) and implement an error behaviour.
Use RepeatOnError:=TRUE for objects or manually implement repeat behavour.
In most cases OnChainCancel and OnChainError should have the same code because in both cases the chain is aborted. Therefore the chain templates in Control plus Studio V5 have a new reset method called by OnChainCancel and OnChainError:
... View more