diff options
| author | gdamore <gdamore@users.noreply.github.com> | 2025-01-13 00:34:40 +0000 |
|---|---|---|
| committer | gdamore <gdamore@users.noreply.github.com> | 2025-01-13 00:34:40 +0000 |
| commit | b163d078fcb3e40ad3f047f42326e9267bc4da50 (patch) | |
| tree | 950101e5901f3581b9c9b3d2e60db9b1cb1c55ac /ref/api/errors.html | |
| parent | 8fd15db0525b4b30a328fd458d05384e2891f49d (diff) | |
| download | nng-b163d078fcb3e40ad3f047f42326e9267bc4da50.tar.gz nng-b163d078fcb3e40ad3f047f42326e9267bc4da50.tar.bz2 nng-b163d078fcb3e40ad3f047f42326e9267bc4da50.zip | |
deploy: 1b1f4609c6dad724b88dfb069b2260341e582906
Diffstat (limited to 'ref/api/errors.html')
| -rw-r--r-- | ref/api/errors.html | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/ref/api/errors.html b/ref/api/errors.html index f3834e8f..766ab1f7 100644 --- a/ref/api/errors.html +++ b/ref/api/errors.html @@ -221,15 +221,25 @@ </style> <h1 id="errors"><a class="header" href="#errors">Errors</a></h1> +<pre><code class="language-c">typedef enum ... nng_err; +</code></pre> <p>Many <em>NNG</em> functions can fail for a variety of reasons. These functions tend to return either zero on success, or a non-zero error code to indicate failure. <sup><a name="to-footnote-1"><a href="#footnote-1">1</a></a></sup></p> -<p>All these error codes are <code>int</code>.</p> +<p>All these error codes are <code>nng_err</code>.</p> +<div class="mdbook-alerts mdbook-alerts-note"> +<p class="mdbook-alerts-title"> + <span class="mdbook-alerts-icon"></span> + note +</p> +<p>Many APIs are still using <code>int</code>, but the <code>nng_err</code> enumeration can be used +instead, and will help with debugging.</p> +</div> <p>Not every possible error code is defined here, as sometimes an underlying system or library error code is “wrapped”.</p> <h2 id="human-readable-error-message"><a class="header" href="#human-readable-error-message">Human Readable Error Message</a></h2> -<pre><code class="language-c">const char *nng_strerror(int err); +<pre><code class="language-c">const char *nng_strerror(nng_err err); </code></pre> <p>The <a name="a001"></a><code>nng_strerror</code> returns the human-readable description of the given error in <code>err</code>.</p> |
