aboutsummaryrefslogtreecommitdiff
path: root/docs/src
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2015-07-30 18:52:09 +0200
committerBen Noordhuis <info@bnoordhuis.nl>2015-08-18 16:10:37 +0200
commit96fc77d5d998d7a70c4a1c705900432a7a4f828d (patch)
tree02f51517f9e8c9a21a438e90c68847fee4346b90 /docs/src
parentdf62b54aa2b3d916ca442ee84f0678129a848c4f (diff)
downloadlibuv-96fc77d5d998d7a70c4a1c705900432a7a4f828d.tar.gz
libuv-96fc77d5d998d7a70c4a1c705900432a7a4f828d.zip
unix,windows: don't assert on unknown error code
Make uv_err_name() and uv_strerror() return a dynamically allocated string when the error code is not recognized. It leaks a few bytes of memory but that can't be helped. Asserting and aborting is, in my opinion, much less helpful. Fixes: https://github.com/nodejs/node/issues/63 PR-URL: https://github.com/libuv/libuv/pull/467 Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Diffstat (limited to 'docs/src')
-rw-r--r--docs/src/errors.rst6
1 files changed, 4 insertions, 2 deletions
diff --git a/docs/src/errors.rst b/docs/src/errors.rst
index 5d59dc30..cec25f51 100644
--- a/docs/src/errors.rst
+++ b/docs/src/errors.rst
@@ -322,8 +322,10 @@ API
.. c:function:: const char* uv_strerror(int err)
- Returns the error message for the given error code.
+ Returns the error message for the given error code. Leaks a few bytes
+ of memory when you call it with an unknown error code.
.. c:function:: const char* uv_err_name(int err)
- Returns the error name for the given error code.
+ Returns the error name for the given error code. Leaks a few bytes
+ of memory when you call it with an unknown error code.