8. The Aux library
The aux library implements default handlers for compiler and runtime errors and a stack dumping.
8.1. C API
-
void sqstd_seterrorhandlers(HSQUIRRELVM v)
- Parameters
v (HSQUIRRELVM) – the target VM
initialize compiler and runtime error handlers, the handlers use the print function set through(sq_setprintfunc) to output the error.
-
void sqstd_printcallstack(HSQUIRRELVM v)
- Parameters
v (HSQUIRRELVM) – the target VM
prints the call stack and stack contents. the function uses the error printing function set through(sq_setprintfunc) to output the stack dump.
-
void sqstd_formatcallstackstring(HSQUIRRELVM v)
- Parameters
v (HSQUIRRELVM) – the target VM
Prints the call stack and stack contents to the string and pushes resulting string to the stack. Produces the same output as (sqstd_printcallstack) but without using print function.