CTL2 also provides a simple mechanism for catching and handling possible errors.
However, CTL2 differs from CTL1 regarding error handling.
It does not use the
It only uses a set of optional
OnError() functions that
exist to each required transformation function.
For example, for required functions (e.g.
there exist following optional functions:
Each of these required functions may have its (optional) counterpart
whose name differs from the original (required) by adding the
<required ctl template function>OnError() function
returns the same values as the original required function.
This way, any exception that is thrown by the original required function causes call of
<required ctl template function>OnError() counterpart
transform() fail may call
transformOnError(), any incorrect code can be fixed,
an error message can be printed to the Console, etc.
Remember that these
If you want some