There is no way to handle errors through PTPScript - appropriate errors will be flagged in the PHP backend and should be handled by the PHP programmer. However, there are a few notes worth making.

When an error is flagged, the template file that the error occurred in will be reported, along with the line in the template that the error occurred on. The precision of the line number depends whether the error happened at parse time or at run time.

If the error happened at parse time, the exact line number will be given, even for placeholders that span multiple lines.

If the error happened at run time, the line number given will be that of the line that the placeholder containing the code that flagged the error started on, which for a placeholder spanning multiple lines, may not be the actual line itself.

The best approach is obviously to avoid errors, through careful coding and also by using various checking methods where appropriate (for instance, the Existence Operators, and the Type-Checking Operators).

ptpscript/errors.txt · Last modified: 2007/01/24 10:15
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki