Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDivlo <contact@divlo.fr>2021-09-02 02:59:45 +0300
committerMichael Dawson <mdawson@devrus.com>2021-09-08 20:31:07 +0300
commit59d3d542d69f078cd1d9f50f26b83944c381724e (patch)
tree418aefbd529e5f7261626a3bc1d480d161c35756 /src/node_errors.cc
parent33b5107d13f3b5b01861ac7deb4253cfc3d84fc5 (diff)
errors: disp ver on fatal except that causes exit
Display Node.js version at the end of stacktraces on fatal exception that causes exit. Easier for debugging so you don't have to ask "what node version are you on?", it is directly in the error the user copy/paste from when asking for help. Fixes: https://github.com/nodejs/node/issues/29731 PR-URL: https://github.com/nodejs/node/pull/38332 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Diffstat (limited to 'src/node_errors.cc')
-rw-r--r--src/node_errors.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/node_errors.cc b/src/node_errors.cc
index 0e4ba26e1bc..91f69ef43f2 100644
--- a/src/node_errors.cc
+++ b/src/node_errors.cc
@@ -414,6 +414,10 @@ static void ReportFatalException(Environment* env,
}
}
+ if (env->options()->extra_info_on_fatal_exception) {
+ FPrintF(stderr, "\nNode.js %s\n", NODE_VERSION);
+ }
+
fflush(stderr);
}