throw |
Top Previous Next |
Scripts > Class elements and c++ instructions > Interpreted C++ instructions > throw
With an instruction of the kind:
throw CTT_Error("error message");
a TETRA program can be canceled. An arbitrary text or a string variable can be passed as message. In the C++ jargon for this statement is said, that the exception "CTT_Error" is thrown. Inside of the TextTransformer, the text will be shown in the log window.
User defined error message: error message.
Remark: Such a break is executed in the term production of the calculator example to prevent a division by null.
An alternative to the throw command is the function GenError. You can force a stop of a program also, if the interpreter is deactivated. For this the key word EXIT is defined.
|
This page belongs to the TextTransformer Documentation |
Home Content German |