TT_ERROR(3)

πŸ“¦
version 2.5.3 Β· 2 versions
, in nixos 26.05

πŸŽ€ 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 πŸ¦‹


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