From 5e05fe8e7877ffd6bc473b77b8ca0a12ad26bd67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Thu, 14 Mar 2024 16:23:56 +0100 Subject: Cowboy 2.12, Cowlib 2.13, Gun 2.1 --- docs/en/gun/2.1/manual/gun_error/index.html | 207 ++++++++++++++++++++++++++++ 1 file changed, 207 insertions(+) create mode 100644 docs/en/gun/2.1/manual/gun_error/index.html (limited to 'docs/en/gun/2.1/manual/gun_error') diff --git a/docs/en/gun/2.1/manual/gun_error/index.html b/docs/en/gun/2.1/manual/gun_error/index.html new file mode 100644 index 00000000..c9a9bb9d --- /dev/null +++ b/docs/en/gun/2.1/manual/gun_error/index.html @@ -0,0 +1,207 @@ + + + + + + + + + + Nine Nines: gun_error(3) + + + + + + + + + + + + + + + +
+
+
+
+ +

gun_error(3)

+ +

Name

+

gun_error - Stream or connection-wide error

+

Description

+
+
{gun_error, ConnPid, StreamRef, Reason}
+{gun_error, ConnPid, Reason}
+
+ConnPid   :: pid()
+StreamRef :: gun:stream_ref()
+Reason    :: any()
+
+

Stream or connection-wide error.

+

These messages inform the relevant process that an error occurred. A reference is given when the error pertains to a specific stream. Connection-wide errors do not imply that the connection is no longer usable, they are used for all errors that are not specific to a stream.

+

Elements

+
ConnPid
+

The pid of the Gun connection process.

+
+
StreamRef
+

Identifier of the stream that resulted in an error.

+
+
Reason
+

The reason for the error.

+

It is present for debugging purposes only. You should not rely on this value to perform operations programmatically.

+
+
+

Changelog

+
  • 1.0: Message introduced. +
  • +
+

Examples

+
Receive a gun_error message in a gen_server
+
+
handle_info({gun_error, ConnPid, _Reason},
+            State=#state{conn_pid=ConnPid}) ->
+    %% Do something.
+    {noreply, State};
+handle_info({gun_error, ConnPid, _StreamRef, _Reason},
+            State=#state{conn_pid=ConnPid}) ->
+    %% Do something.
+    {noreply, State}.
+
+

See also

+

gun(3), gun_up(3), gun_tunnel_up(3), gun_down(3)

+ + + + + + +
+ +
+ + +

+ Gun + 2.1 + Function Reference + +

+ + + +

Navigation

+ +

Version select

+ + +

Like my work? Donate!

+

Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:

+
+ + + + + + + + + +

Recurring payment options are also available via GitHub Sponsors. These funds are used to cover the recurring expenses like food, dedicated servers or domain names.

+ + + +
+
+
+
+ + + + + + + + + -- cgit v1.2.3