Vely logo Empower C
install  tutorials  examples
documentation  license  about

12.1.0 released on Sep 19, 2022



Reports a fatal error.


report-error <format>,  <expression> [ , ... ]


To report a fatal error, and write the relevant description of it in the trace file (see how_vely_works) regardless of whether tracing is enabled or not, use report-error. The error message is output in the same fashion as in pf-out, where <format> (of string type) and <expression>s (of any type) are used as in C's "printf()" function.

Note that you must always have at least one <expression>, even when the entire output is just a string constant, so for example you would write:
report-error "%s", "Bad value for number of processes"

The reason for this is to avoid formatting errors, and to use formatting in a consistent fashion.

Because your program runs as a FastCGI application, the program does not end, but rather exits current request and then moves on to accept the next one.

You can see the list of last N errors (and the location of file containing backtrace for them) by using vv, for instance to see the last 3 errors:
vv -e 3


report-error "Too many input parameters, encountered total of [%lld]", num_count


Error handling ( error_code   error_handling   on-error   report-error  )  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.