mirror of
https://github.com/nodejs/node.git
synced 2024-11-29 15:06:33 +01:00
Rename fatal_exception to FatalException
This commit is contained in:
parent
c4e53c7ceb
commit
3bdd042a6e
@ -45,7 +45,7 @@ do { \
|
||||
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)
|
||||
|
14
src/http.cc
14
src/http.cc
@ -98,7 +98,7 @@ HTTPConnection::on_message_begin (http_parser *parser)
|
||||
TryCatch try_catch;
|
||||
Local<Object> message_handler = on_message->NewInstance();
|
||||
if (try_catch.HasCaught()) {
|
||||
fatal_exception(try_catch);
|
||||
FatalException(try_catch);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -125,7 +125,7 @@ HTTPConnection::name (http_parser *parser, const char *buf, size_t len) \
|
||||
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; \
|
||||
@ -201,7 +201,7 @@ HTTPConnection::on_headers_complete (http_parser *parser)
|
||||
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;
|
||||
@ -246,7 +246,7 @@ HTTPConnection::on_body (http_parser *parser, const char *buf, size_t len)
|
||||
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;
|
||||
@ -273,7 +273,7 @@ HTTPConnection::on_message_complete (http_parser *parser)
|
||||
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;
|
||||
@ -356,7 +356,7 @@ HTTPServer::OnConnection (struct sockaddr *addr, socklen_t len)
|
||||
HTTPConnection::server_constructor_template->GetFunction()->NewInstance(0, NULL);
|
||||
|
||||
if (connection_handle.IsEmpty()) {
|
||||
fatal_exception(try_catch);
|
||||
FatalException(try_catch);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -370,7 +370,7 @@ HTTPServer::OnConnection (struct sockaddr *addr, socklen_t len)
|
||||
Local<Value> ret = connection_handler->Call(handle_, 1, argv);
|
||||
|
||||
if (ret.IsEmpty())
|
||||
fatal_exception(try_catch);
|
||||
FatalException(try_catch);
|
||||
|
||||
return connection;
|
||||
}
|
||||
|
@ -419,7 +419,7 @@ Connection::OnReceive (const void *buf, size_t len)
|
||||
callback->Call(handle_, argc, argv);
|
||||
|
||||
if (try_catch.HasCaught())
|
||||
fatal_exception(try_catch);
|
||||
FatalException(try_catch);
|
||||
}
|
||||
|
||||
#define DEFINE_SIMPLE_CALLBACK(name, symbol) \
|
||||
@ -432,7 +432,7 @@ void name () \
|
||||
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)
|
||||
@ -500,7 +500,7 @@ Acceptor::OnConnection (struct sockaddr *addr, socklen_t len)
|
||||
Connection::constructor_template->GetFunction()->NewInstance(0, NULL);
|
||||
|
||||
if (connection_handle.IsEmpty()) {
|
||||
fatal_exception(try_catch);
|
||||
FatalException(try_catch);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -514,7 +514,7 @@ Acceptor::OnConnection (struct sockaddr *addr, socklen_t len)
|
||||
Local<Value> ret = connection_handler->Call(handle_, 1, argv);
|
||||
|
||||
if (ret.IsEmpty())
|
||||
fatal_exception(try_catch);
|
||||
FatalException(try_catch);
|
||||
|
||||
return connection;
|
||||
}
|
||||
|
@ -210,7 +210,7 @@ OnFatalError (const char* location, const char* message)
|
||||
|
||||
|
||||
void
|
||||
node::fatal_exception (TryCatch &try_catch)
|
||||
node::FatalException (TryCatch &try_catch)
|
||||
{
|
||||
ReportException(&try_catch);
|
||||
::exit(1);
|
||||
|
@ -25,7 +25,7 @@ do { \
|
||||
|
||||
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 {
|
||||
|
@ -40,7 +40,7 @@ Timer::OnTimeout (EV_P_ ev_timer *watcher, int revents)
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user