MCPcopy Create free account
hub / github.com/denoland/celld / getStackString

Function getStackString

crates/celld/js/node_util.js:2176–2185  ·  view source on GitHub ↗
(ctx, error)

Source from the content-addressed store, hash-verified

2174 return { len: 0, offset: 0 };
2175}
2176function getStackString(ctx, error) {
2177 if (error.stack) {
2178 if (typeof error.stack === 'string') {
2179 return error.stack;
2180 }
2181 // This 'NaN' is a very strange Nodeism, but is necessary for correct behaviour!
2182 return formatValue(ctx, error.stack, NaN);
2183 }
2184 return Error.prototype.toString.call(error);
2185}
2186function getStackFrames(ctx, err, stack) {
2187 const frames = stack.split('\n');
2188 let cause;

Callers 2

getStackFramesFunction · 0.85
formatErrorFunction · 0.85

Calls 1

formatValueFunction · 0.85

Tested by

no test coverage detected