Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #45 from justmoon/fixerr

OpAsync error handler ignores errors
  • Loading branch information...
commit 95057fde4e8c429cdb81e6bb4417b3eff7712145 2 parents 2a96b69 + 0f9f52d
@justmoon justmoon authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/cpp/handle.cc
View
6 src/cpp/handle.cc
@@ -92,8 +92,12 @@ class JHandle::OpAsync {
op->Result(error, result);
- if (error.IsEmpty() && result.IsEmpty() && !op->status_.ok())
+ if ((error.IsEmpty() || error->IsNull()) &&
+ (result.IsEmpty() || result->IsNull()) &&
+ !op->status_.ok() &&
+ !op->status_.IsNotFound()) {
error = Exception::Error(String::New(op->status_.ToString().c_str()));
+ }
Handle<Value> args[] = { error, result };
Please sign in to comment.
Something went wrong with that request. Please try again.