Lines Matching refs:stack

1240   return error.stack ? String(error.stack) : ErrorPrototypeToString(error);
1243 function getStackFrames(ctx, err, stack) {
1244 const frames = StringPrototypeSplit(stack, '\n');
1253 // Remove stack frames identical to frames in cause.
1262 const msg = ` ... ${skipped} lines matching cause stack trace ...`;
1270 function improveStack(stack, constructor, name, tag) {
1271 // A stack trace may contain arbitrary data. Only manipulate the output
1277 StringPrototypeStartsWith(stack, name) &&
1278 (stack.length === len || stack[len] === ':' || stack[len] === '\n'))) {
1281 const start = RegExpPrototypeExec(/^([A-Z][a-z_ A-Z0-9[\]()-]+)(?::|\n {4}at)/, stack) ||
1282 RegExpPrototypeExec(/^([a-z_A-Z0-9-]*Error)$/, stack);
1291 stack = `${prefix}: ${stack}`;
1293 stack = `${prefix}${StringPrototypeSlice(stack, len)}`;
1296 stack = `${prefix} [${name}]${StringPrototypeSlice(stack, len)}`;
1300 return stack;
1303 function removeDuplicateErrorKeys(ctx, keys, err, stack) {
1305 for (const name of ['name', 'message', 'stack']) {
1307 // Only hide the property in case it's part of the original stack
1308 if (index !== -1 && StringPrototypeIncludes(stack, err[name])) {
1369 let stack = getStackString(err);
1371 removeDuplicateErrorKeys(ctx, keys, err, stack);
1384 stack = improveStack(stack, constructor, name, tag);
1386 // Ignore the error message if it's contained in the stack.
1387 let pos = (err.message && StringPrototypeIndexOf(stack, err.message)) || -1;
1390 // Wrap the error in brackets in case it has no stack trace.
1391 const stackStart = StringPrototypeIndexOf(stack, '\n at', pos);
1393 stack = `[${stack}]`;
1395 let newStack = StringPrototypeSlice(stack, 0, stackStart);
1396 const stackFramePart = StringPrototypeSlice(stack, stackStart + 1);
1425 stack = newStack;
1427 // The message and the stack have to be indented as well!
1430 stack = StringPrototypeReplaceAll(stack, '\n', `\n${indentation}`);
1432 return stack;
1551 'prematurely. Maximum call stack size exceeded.]',
1556 assert.fail(err.stack);