Vely logo Empower C
install  tutorials  examples
documentation  license  about

12.1.0 released on Sep 19, 2022

exit-request



PURPOSE:


Exit current request processing.

SYNTAX:


exit-request


DESCRIPTION:


Exits current request by transferring control directly after the top-level request dispatcher. If there is an after_request_handler, it will still execute, unless exit-request is called from before_request_handler. exit-request will have no effect in startup_handler because that handler runs before any requests.

exit-request is useful when your request handler has called other functions (i.e. those implemented in non_request source files), which may have called others (etc.), and there is no need to return in the reverse order, nor to pass any further data back to them; in which case returning one step at a time may be cumbersome and error prone.

In other words, exit-request jumps to the top-level request dispatcher, and the stack of functions called to get to exit-request will be bypassed, thus those functions will not get control back; and they will not perform any additional work, rather simply the next request will be processed immediately.

EXAMPLES:


#include "vely.h"

void req_handler()
{
    ...
    exit-request
    ...
}


SEE ALSO:


Program flow ( exit-request  )  SEE ALL (documentation)



Copyright (c) 2022 DaSoftver LLC. Vely is a trademark of Dasoftver LLC. The software and information herein are provided "AS IS" and without any warranties or guarantees of any kind. Icons copyright PaweĊ‚ Kuna licensed under MIT. This web page is licensed under CC-BY-SA-4.0.