Skip to content

Commit 3e69c59

Browse files
committed
remove FatalException
The non-isolate version of node::FatalException() has been deprecated in io.js; more precisely, it's deprecated in node.js v0.12 as well but a bug in joyent/node prevents the deprecation warning from printing. We don't have to catch exceptions ourselves. Exceptions simply unwind the stack until they encounter a try/catch block is encountered or the fatal exception handler in the io.js or node.js run-time.
1 parent 090634f commit 3e69c59

1 file changed

Lines changed: 0 additions & 6 deletions

File tree

generate/templates/partials/async_function.cc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,6 @@ void {{ cppClassName }}::{{ cppFunctionName }}Worker::Execute() {
103103
}
104104

105105
void {{ cppClassName }}::{{ cppFunctionName }}Worker::HandleOKCallback() {
106-
TryCatch try_catch;
107-
108106
if (baton->error_code == GIT_OK) {
109107
{%if not .|returnsCount %}
110108
Handle<v8::Value> result = NanUndefined();
@@ -162,10 +160,6 @@ void {{ cppClassName }}::{{ cppFunctionName }}Worker::HandleOKCallback() {
162160
{%endeach%}
163161
}
164162

165-
if (try_catch.HasCaught()) {
166-
node::FatalException(try_catch);
167-
}
168-
169163
{%each args|argsInfo as arg %}
170164
{%if arg.isCppClassStringOrArray %}
171165
{%if arg.freeFunctionName %}

0 commit comments

Comments
 (0)