CML Reference Guide

Chapter 4.22:  Debugging Functions


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))

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().