summaryrefslogtreecommitdiff
path: root/src/handle_wrap.cc
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2011-10-19 16:53:07 -0700
committerRyan Dahl <ry@tinyclouds.org>2011-10-19 16:53:07 -0700
commit6cc42927d83adf2f89809ff54732e13f9376ff6c (patch)
treedc4674913a23541edaa37557fb4b5afcf16bb299 /src/handle_wrap.cc
parent88af0c86357cf627cd7e7cc6f83f7f546754f6c3 (diff)
downloadandroid-node-v8-6cc42927d83adf2f89809ff54732e13f9376ff6c.tar.gz
android-node-v8-6cc42927d83adf2f89809ff54732e13f9376ff6c.tar.bz2
android-node-v8-6cc42927d83adf2f89809ff54732e13f9376ff6c.zip
Display sys_errno when UV_UNKNOWN is returned
Diffstat (limited to 'src/handle_wrap.cc')
-rw-r--r--src/handle_wrap.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/handle_wrap.cc b/src/handle_wrap.cc
index b82418ab37..45ab0bbf2d 100644
--- a/src/handle_wrap.cc
+++ b/src/handle_wrap.cc
@@ -24,7 +24,9 @@ using v8::Integer;
HandleWrap* wrap = \
static_cast<HandleWrap*>(args.Holder()->GetPointerFromInternalField(0)); \
if (!wrap) { \
- SetErrno(UV_EBADF); \
+ uv_err_t err; \
+ err.code = UV_EBADF; \
+ SetErrno(err); \
return scope.Close(Integer::New(-1)); \
}