TT_ERROR(3)
π tt_error β capture ToolTalk function errors π
okay bestie, welcome to the library call page for tt_error β yes, the one that helps you capture ToolTalk function errors. π
β¨ NAME β¨
tt_error β capture ToolTalk function errors
β¨ SYNOPSIS β¨
#include &<Tt/tt_c.h>
void tt_error(
const char *funcname,
Tt_status status);
π DESCRIPTION π
The tt_error function is a publicly-known null function. It gets called by the ToolTalk library just before it returns from any ToolTalk API call that has a status other than TT_OK. The caller passes the name of the function thatβs about to return and the functionβs status code. π«Ά
You can use this function to set a dbx breakpoint to quickly catch and trace back any ToolTalk errors. You can also interpose this function, for example, to log ToolTalk errors to stderr. no cap, thatβs the whole flex. β¨
π§ ARGUMENTS π§
funcnameβ specifies the name of the function. πstatusβ specifies the functionβs return status value. π¦
πΈ RETURN VALUE πΈ
None. Literally none, bestie. π
π APPLICATION USAGE π
The following code example shows how an application might interpose this function to log ToolTalk errors to stderr:
void tt_error(const char *funcname, Tt_status status) {
fprintf(stderr, "ToolTalk function %s returned %s.0,
funcname, tt_status_message(status));
}
periodt β thatβs the exact example from the page. π
π¦ SEE ALSO π¦
Tt/tt_c.h-Tttt_c(5)
okay thatβs the tea, bestie β the footer/source line is tt_error(library call), and thereβs no separate version or date stamp printed here, so Iβm not inventing one. mwah π
π¦ where this page comes from
- nixos 26.05: cde 2.5.3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms