MCPcopy Index your code
hub / github.com/nodejs/node / fatalError

Function fatalError

lib/internal/async_hooks.js:162–176  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

160
161// Used to fatally abort the process if a callback throws.
162function fatalError(e) {
163 if (typeof e?.stack === 'string') {
164 process._rawDebug(e.stack);
165 } else {
166 const o = inspectExceptionValue(e);
167 ErrorCaptureStackTrace(o, fatalError);
168 process._rawDebug(o.stack);
169 }
170
171 const { getOptionValue } = require('internal/options');
172 if (getOptionValue('--abort-on-uncaught-exception')) {
173 process.abort();
174 }
175 process.exit(kGenericUserError);
176}
177
178function lookupPublicResource(resource) {
179 if (typeof resource !== 'object' || resource === null) return resource;

Callers 2

emitInitNativeFunction · 0.85
emitHookFunction · 0.85

Calls 5

inspectExceptionValueFunction · 0.85
getOptionValueFunction · 0.85
abortMethod · 0.65
requireFunction · 0.50
exitMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…