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