TryCatch try_catch; \
(*callback)->Call(Context::GetCurrent()->Global(), argc, argv); \
if(try_catch.HasCaught()) \
- node::fatal_exception(try_catch); \
+ node::FatalException(try_catch); \
free(callback); \
} \
} while(0)
TryCatch try_catch;
Local<Object> message_handler = on_message->NewInstance();
if (try_catch.HasCaught()) {
- fatal_exception(try_catch);
+ FatalException(try_catch);
return -1;
}
Local<Value> argv[1] = { String::New(buf, len) }; \
Local<Value> ret = callback->Call(message_handler, 1, argv); \
if (ret.IsEmpty()) { \
- fatal_exception(try_catch); \
+ FatalException(try_catch); \
return -2; \
} \
if (ret->IsFalse()) return -3; \
TryCatch try_catch;
Local<Value> ret = on_headers_complete->Call(message_handler, 0, NULL);
if (ret.IsEmpty()) {
- fatal_exception(try_catch);
+ FatalException(try_catch);
return -2;
}
if (ret->IsFalse()) return -3;
TryCatch try_catch;
Local<Value> ret = on_body->Call(message_handler, 1, argv);
if (ret.IsEmpty()) {
- fatal_exception(try_catch);
+ FatalException(try_catch);
return -2;
}
if (ret->IsFalse()) return -3;
TryCatch try_catch;
Local<Value> ret = on_msg_complete->Call(message_handler, 0, NULL);
if (ret.IsEmpty()) {
- fatal_exception(try_catch);
+ FatalException(try_catch);
return -2;
}
if (ret->IsFalse()) return -3;
HTTPConnection::server_constructor_template->GetFunction()->NewInstance(0, NULL);
if (connection_handle.IsEmpty()) {
- fatal_exception(try_catch);
+ FatalException(try_catch);
return NULL;
}
Local<Value> ret = connection_handler->Call(handle_, 1, argv);
if (ret.IsEmpty())
- fatal_exception(try_catch);
+ FatalException(try_catch);
return connection;
}
callback->Call(handle_, argc, argv);
if (try_catch.HasCaught())
- fatal_exception(try_catch);
+ FatalException(try_catch);
}
#define DEFINE_SIMPLE_CALLBACK(name, symbol) \
TryCatch try_catch; \
callback->Call(handle_, 0, NULL); \
if (try_catch.HasCaught()) \
- node::fatal_exception(try_catch); \
+ node::FatalException(try_catch); \
}
DEFINE_SIMPLE_CALLBACK(Connection::OnConnect, ON_CONNECT_SYMBOL)
Connection::constructor_template->GetFunction()->NewInstance(0, NULL);
if (connection_handle.IsEmpty()) {
- fatal_exception(try_catch);
+ FatalException(try_catch);
return NULL;
}
Local<Value> ret = connection_handler->Call(handle_, 1, argv);
if (ret.IsEmpty())
- fatal_exception(try_catch);
+ FatalException(try_catch);
return connection;
}
void
-node::fatal_exception (TryCatch &try_catch)
+node::FatalException (TryCatch &try_catch)
{
ReportException(&try_catch);
::exit(1);
enum encoding {ASCII, UTF8, RAW};
enum encoding ParseEncoding (v8::Handle<v8::Value> encoding_v);
-void fatal_exception (v8::TryCatch &try_catch);
+void FatalException (v8::TryCatch &try_catch);
void eio_warmup (void); // call this before creating a new eio event.
class ObjectWrap {
TryCatch try_catch;
callback->Call (timer->handle_, 0, NULL);
if (try_catch.HasCaught())
- fatal_exception(try_catch);
+ FatalException(try_catch);
/* XXX i'm a bit worried if this is the correct test?
* it's rather crutial for memory leaks the conditional here test to see