Chapter 4.22: Debugging Functions
[TOP] [UP] [PREV]
Caucus version 4.1 adds run-time CML syntax and execution error checking and reporting. Several new functions can assist you in debugging your custom CML pages.
- Evaluates to the text of all error messages accumulated since the last call to $errors(). (In other words, the error text is cleared by each call to $errors().)
A good way to use this function is to display the errors at the bottom of a page, just before the closing </BODY> tag, as in:
set errtext $errors() if $not_empty ($(errtext)) "<HR> "<FONT COLOR=RED> "$t2hbr($(errtext)) "</FONT> "<HR> end "</BODY>
- Displays the names and values of all variables in list. If empty, displays all variables, sorted alphabetically.
Again, a good place to use this is at the end of a CML page, perhaps in the same if block as $errors(). If this function is used inside an HTML page, it is (like $errors()) a good idea to wrap it inside $t2hbr().