(frame: StackTrace.StackTrace.Frame)
| 42 | } |
| 43 | |
| 44 | export function stringifyFrame(frame: StackTrace.StackTrace.Frame): string { |
| 45 | let result = `at ${frame.name ?? '<anonymous>'}`; |
| 46 | if (frame.uiSourceCode) { |
| 47 | result += ` (${frame.uiSourceCode.displayName()}:${frame.line}:${frame.column})`; |
| 48 | } else if (frame.url) { |
| 49 | result += ` (${frame.url}:${frame.line}:${frame.column})`; |
| 50 | } |
| 51 | return result; |
| 52 | } |
| 53 | |
| 54 | export function stringifyFragment(fragment: StackTrace.StackTrace.Fragment): string { |
| 55 | return fragment.frames.map(stringifyFrame).join('\n'); |
no test coverage detected