(err: any)
| 226 | |
| 227 | // Extract a (url, line, column) triple from a V8 stack string |
| 228 | function parseStackFrame(err: any): { |
| 229 | url?: string; |
| 230 | line?: number; |
| 231 | column?: number; |
| 232 | } { |
| 233 | try { |
| 234 | const stack: string = (err && (err.stack || err.message)) || ''; |
| 235 | // Match patterns like: at <anonymous> (http://host/path.js:123:45) OR http://host/path.js:123:45 |
| 236 | const re = /(https?:[^\s)]+):(\d+):(\d+)/; |
| 237 | const m = stack.match(re); |
| 238 | if (m) { |
| 239 | return { |
| 240 | url: m[1], |
| 241 | line: Number(m[2] || '0'), |
| 242 | column: Number(m[3] || '0'), |
| 243 | }; |
| 244 | } |
| 245 | } catch {} |
| 246 | return {}; |
| 247 | } |
| 248 | |
| 249 | async function dumpDynImportDiagnostics(spec: string, err: any) { |
| 250 | try { |
no test coverage detected