Skip to content

Commit

Permalink
report: simplify OnFatalError() handling
Browse files Browse the repository at this point in the history
PR-URL: #26191
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
  • Loading branch information
cjihrig authored and addaleax committed Feb 21, 2019
1 parent 6709dfa commit bbbe77f
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/node_errors.cc
Original file line number Diff line number Diff line change
Expand Up @@ -316,15 +316,9 @@ void OnFatalError(const char* location, const char* message) {
Isolate* isolate = Isolate::GetCurrent();
HandleScope handle_scope(isolate);
Environment* env = Environment::GetCurrent(isolate);
if (env != nullptr) {
std::shared_ptr<PerIsolateOptions> options = env->isolate_data()->options();
if (options->report_on_fatalerror) {
report::TriggerNodeReport(
isolate, env, message, __func__, "", Local<String>());
}
} else {
if (env == nullptr || env->isolate_data()->options()->report_on_fatalerror) {
report::TriggerNodeReport(
isolate, nullptr, message, __func__, "", Local<String>());
isolate, env, message, __func__, "", Local<String>());
}
#endif // NODE_REPORT
fflush(stderr);
Expand Down

0 comments on commit bbbe77f

Please sign in to comment.