diff --git a/src/connection.cpp b/src/connection.cpp index 0664149..42d5e5e 100644 --- a/src/connection.cpp +++ b/src/connection.cpp @@ -347,7 +347,11 @@ void Connection::EIO_AfterCommit(uv_work_t* req, int status) { Handle argv[2]; argv[0] = Undefined(); + v8::TryCatch tryCatch; baton->callback->Call(Context::GetCurrent()->Global(), 1, argv); + if (tryCatch.HasCaught()) { + node::FatalException(tryCatch); + } delete baton; } @@ -365,7 +369,11 @@ void Connection::EIO_AfterRollback(uv_work_t* req, int status) { Handle argv[2]; argv[0] = Undefined(); + v8::TryCatch tryCatch; baton->callback->Call(Context::GetCurrent()->Global(), 1, argv); + if (tryCatch.HasCaught()) { + node::FatalException(tryCatch); + } delete baton; } @@ -715,7 +723,11 @@ void Connection::EIO_AfterExecute(uv_work_t* req, int status) { argv[1] = obj; } } + v8::TryCatch tryCatch; baton->callback->Call(Context::GetCurrent()->Global(), 2, argv); + if (tryCatch.HasCaught()) { + node::FatalException(tryCatch); + } } catch(NodeOracleException &ex) { Handle argv[2]; argv[0] = Exception::Error(String::New(ex.getMessage().c_str())); diff --git a/src/oracle_bindings.cpp b/src/oracle_bindings.cpp index 8155341..330eca1 100644 --- a/src/oracle_bindings.cpp +++ b/src/oracle_bindings.cpp @@ -111,7 +111,11 @@ void OracleClient::EIO_AfterConnect(uv_work_t* req, int status) { argv[1] = connection; } + v8::TryCatch tryCatch; baton->callback->Call(Context::GetCurrent()->Global(), 2, argv); + if (tryCatch.HasCaught()) { + node::FatalException(tryCatch); + } baton->callback.Dispose(); if(baton->error) delete baton->error;