|
infix
A JIT-Powered FFI Library for C
|
Cookbook Chapter 9: Advanced Error Reporting for the Parser. More...
Functions | |
| static void | report_parse_error (const char *signature) |
| A helper function that attempts to parse a signature and reports detailed error information on failure. | |
| int | main () |
Cookbook Chapter 9: Advanced Error Reporting for the Parser.
This example demonstrates how to get detailed, thread-safe error information when an infix API call fails. This is especially useful for providing rich feedback to users when they provide an invalid signature string.
After a parsing function fails, a call to infix_get_last_error() returns an infix_error_details_t struct containing the error code, a human-readable message, and the exact character position of the error in the source string.
| int main | ( | void | ) |
|
static |
A helper function that attempts to parse a signature and reports detailed error information on failure.
| signature | The signature string to parse. |