TT_MESSAGE_FAIL(3)

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

✨ NAME ✨

tt_message_fail β€” indicate a message cannot be handled.

Okay bestie, this is the tt_message_fail page from the library call manual, and it’s literally about telling the ToolTalk service β€œnope, I can’t handle this one.” πŸ’…

πŸ¦‹ SYNOPSIS πŸ¦‹

#include &<Tt/tt_c.h>
Tt_status tt_message_fail(
Tt_message m);

🌸 DESCRIPTION 🌸

The tt_message_fail function informs the ToolTalk service that the process cannot handle the request just received. ✨

It also informs the ToolTalk service that the message is not to be offered to other processes of the same ptype β€” the service gets the memo. The ToolTalk service will send the message back to the sender with state TT_FAILED. 🫢

The m argument is the opaque handle for the message involved in this operation.

πŸ”₯ RETURN VALUE πŸ”₯

Upon successful completion, tt_message_fail returns the status of the operation as one of these Tt_status values:

  • TT_OK β€” the operation completed successfully. slay.
  • TT_ERR_NOMP β€” the ttsession(1) process is not running and the ToolTalk service cannot restart it.
  • TT_ERR_NOTHANDLER β€” this application is not the handler for this message.
  • TT_ERR_POINTER β€” the pointer passed does not point to an object of the correct type for this operation.

The status value must be greater than TT_ERR_LAST to avoid confusion with the ToolTalk service status values.

πŸ‘‘ APPLICATION USAGE πŸ‘‘

To distinguish this case from the case where a message failed because no matching handler could be found, the application should place an explanatory message code in the status attribute of the message with tt_message_status_set(3) and tt_message_status_string_set(3) before calling tt_message_fail. iykyk β€” set the status, then fail the message.

🌈 SEE ALSO 🌈


πŸŽ€ Final sign-off, bestie: the footer’s source/version text is just the library call manual label, and there’s no date printed β€” so we’re not inventing one, periodt. πŸŽ€

πŸ“¦ where this page comes from