Go to main content

error

Generate an error and stop execution.

ERROR

NAME

error - Generates an error and stop execution.

SYNOPSIS

error([code:integer], "Error message as a string");

DESCRIPTION

This function generates an error.

EXAMPLES

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>

SEE ALSO

AUTHOR

Written by Pierre Laplante and Caroline Laplante, <laplante@sednove.com>

MODIFICATIONS

1.0 2014-09-09 21:24:14 laplante@sednove.com

Edit

© 2024 extenso Inc. All rights reserved.