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

Function isStackOverflowError

lib/internal/errors.js:867–880  ·  view source on GitHub ↗

* Returns true if `err.name` and `err.message` are equal to engine-specific * values indicating max call stack size has been exceeded. * "Maximum call stack size exceeded" in V8. * @param {Error} err * @returns {boolean}

(err)

Source from the content-addressed store, hash-verified

865 * @returns {boolean}
866 */
867function isStackOverflowError(err) {
868 if (maxStack_ErrorMessage === undefined) {
869 try {
870 function overflowStack() { overflowStack(); }
871 overflowStack();
872 } catch (err) {
873 maxStack_ErrorMessage = err.message;
874 maxStack_ErrorName = err.name;
875 }
876 }
877
878 return err && err.name === maxStack_ErrorName &&
879 err.message === maxStack_ErrorMessage;
880}
881
882// Only use this for integers! Decimal numbers do not work with this function.
883function addNumericalSeparator(val) {

Callers 2

constructor.jsFile · 0.85
formatRawFunction · 0.85

Calls 1

overflowStackFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…