(err, parentPath, parentSource)
| 1987 | } |
| 1988 | |
| 1989 | function reconstructErrorStack(err, parentPath, parentSource) { |
| 1990 | const errLine = StringPrototypeSplit( |
| 1991 | StringPrototypeSlice(err.stack, StringPrototypeIndexOf( |
| 1992 | err.stack, ' at ')), '\n', 1)[0]; |
| 1993 | const { 1: line, 2: col } = |
| 1994 | RegExpPrototypeExec(/(\d+):(\d+)\)/, errLine) || []; |
| 1995 | if (line && col) { |
| 1996 | const srcLine = StringPrototypeSplit(parentSource, '\n', line)[line - 1]; |
| 1997 | const frame = `${parentPath}:${line}\n${srcLine}\n${StringPrototypeRepeat(' ', col - 1)}^\n`; |
| 1998 | setArrowMessage(err, frame); |
| 1999 | } |
| 2000 | } |
| 2001 | |
| 2002 | /** |
| 2003 | * Generate the legacy ERR_REQUIRE_ESM for the cases where require(esm) is disabled. |
no test coverage detected
searching dependent graphs…