19.0.0 released Nov 08, 2023
Report error

Purpose: 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.

See error-handling when report-error is called.
report-error "Too many input parameters, encountered total of [%lld]", num_count

See also
Error handling
See all

You are free to copy, redistribute and adapt this web page (even commercially), as long as you give credit and provide a dofollow link back to this page - see full license at CC-BY-4.0. Copyright (c) 2019-2023 Dasoftver LLC. Vely and elephant logo are trademarks of Dasoftver LLC. The software and information on this web site are provided "AS IS" and without any warranties or guarantees of any kind. Icons from table-icons.io copyright PaweĊ‚ Kuna, licensed under MIT license.