error - Generates an error and stop execution.
error([code:integer], "Error message as a string");
This function generates an error.
Note: In the followings examples, the _ between the { should be removed to make it work.
res={_{error("Wow an error"); }}. return Wow an error.*
res={_{error(code:234,"Wow an error"); }}. return errcode=234
<html>
<body>
<h1>test error</h1>
{_{
a = cgidata();
a;
a.code;
if a.code != undefined then
error(code:a.code,a.error);
endif
}}
</body>
</html>
{_{ a = cgidata(); a; a.code; if a.code != undefined then error(code:a.code,a.error); endif }}
Written by Pierre Laplante and Caroline Laplante, <laplante@sednove.com>
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
1.0 2014-09-09 21:24:14 laplante@sednove.com