| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 7ffa8ec commit 0897504
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -324,7 +324,7 @@ TryCatchScope::~TryCatchScope() { | |||
| 324 | 324 | if (HasCaught() && !HasTerminated() && mode_ == CatchMode::kFatal) { | |
| 325 | 325 | HandleScope scope(env_->isolate()); | |
| 326 | 326 | ReportException(env_, Exception(), Message()); | |
| 327 | - exit(7); | ||
| 327 | + env_->Exit(7); | ||
| 328 | 328 | } | |
| 329 | 329 | } | |
| 330 | 330 | ||
@@ -711,7 +711,7 @@ void FatalException(Isolate* isolate, | |||
| 711 | 711 | // Failed before the process._fatalException function was added! | |
| 712 | 712 | // this is probably pretty bad. Nothing to do but report and exit. | |
| 713 | 713 | ReportException(env, error, message); | |
| 714 | - exit(6); | ||
| 714 | + env->Exit(6); | ||
| 715 | 715 | } else { | |
| 716 | 716 | errors::TryCatchScope fatal_try_catch(env); | |
| 717 | 717 | ||
@@ -727,7 +727,7 @@ void FatalException(Isolate* isolate, | |||
| 727 | 727 | if (fatal_try_catch.HasCaught()) { | |
| 728 | 728 | // The fatal exception function threw, so we must exit | |
| 729 | 729 | ReportException(env, fatal_try_catch); | |
| 730 | - exit(7); | ||
| 730 | + env->Exit(7); | ||
| 731 | 731 | ||
| 732 | 732 | } else if (caught.ToLocalChecked()->IsFalse()) { | |
| 733 | 733 | ReportException(env, error, message); | |
@@ -738,9 +738,9 @@ void FatalException(Isolate* isolate, | |||
| 738 | 738 | Local<Value> code; | |
| 739 | 739 | if (!process_object->Get(env->context(), exit_code).ToLocal(&code) || | |
| 740 | 740 | !code->IsInt32()) { | |
| 741 | - exit(1); | ||
| 741 | + env->Exit(1); | ||
| 742 | 742 | } | |
| 743 | - exit(code.As<Int32>()->Value()); | ||
| 743 | + env->Exit(code.As<Int32>()->Value()); | ||
| 744 | 744 | } | |
| 745 | 745 | } | |
| 746 | 746 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments