---
name: "wslay_event_set_error"
section: "3"
platform: "linux"
package: "libwslay"
version: "1.1.1-7"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/wslay_event_set_error"
---

# wslay\_event\_set\_error(3)

Set error code

## NAME

wslay\_event\_set\_error - Set error code

## SYNOPSIS

\#include \<wslay/wslay.h\>

- **void wslay\_event\_set\_error(wslay\_event\_context\_ptr *ctx*, int *val*)**

  ## DESCRIPTION

*wslay\_event\_set\_error()* sets error code to tell the library there is an error. This function is typically used in user defined callback functions. See the description of callback function to know which error code should be used.

## RETURN VALUE

*wslay\_event\_set\_error()* does not return value.

## AUTHOR

Tatsuhiro Tsujikawa

## COPYRIGHT

2012, 2015, Tatsuhiro Tsujikawa
