summaryrefslogtreecommitdiff
path: root/src/api
diff options
context:
space:
mode:
Diffstat (limited to 'src/api')
-rw-r--r--src/api/exceptions.cc15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/api/exceptions.cc b/src/api/exceptions.cc
index ee5ea984eb..1632574c6b 100644
--- a/src/api/exceptions.cc
+++ b/src/api/exceptions.cc
@@ -244,17 +244,12 @@ Local<Value> WinapiErrnoException(Isolate* isolate,
}
#endif
+// Implement the legacy name exposed in node.h. This has not been in fact
+// fatal any more, as the user can handle the exception in the
+// TryCatch by listening to `uncaughtException`.
+// TODO(joyeecheung): deprecate it in favor of a more accurate name.
void FatalException(Isolate* isolate, const v8::TryCatch& try_catch) {
- // If we try to print out a termination exception, we'd just get 'null',
- // so just crashing here with that information seems like a better idea,
- // and in particular it seems like we should handle terminations at the call
- // site for this function rather than by printing them out somewhere.
- CHECK(!try_catch.HasTerminated());
-
- HandleScope scope(isolate);
- if (!try_catch.IsVerbose()) {
- FatalException(isolate, try_catch.Exception(), try_catch.Message());
- }
+ errors::TriggerUncaughtException(isolate, try_catch);
}
} // namespace node