(Base, clazz)
| 409 | } |
| 410 | |
| 411 | function makeNodeErrorForHideStackFrame(Base, clazz) { |
| 412 | class HideStackFramesError extends Base { |
| 413 | constructor(...args) { |
| 414 | if (isErrorStackTraceLimitWritable()) { |
| 415 | const limit = Error.stackTraceLimit; |
| 416 | Error.stackTraceLimit = 0; |
| 417 | super(...args); |
| 418 | Error.stackTraceLimit = limit; |
| 419 | } else { |
| 420 | super(...args); |
| 421 | } |
| 422 | } |
| 423 | |
| 424 | // This is a workaround for wpt tests that expect that the error |
| 425 | // constructor has a `name` property of the base class. |
| 426 | get ['constructor']() { |
| 427 | return clazz; |
| 428 | } |
| 429 | } |
| 430 | |
| 431 | return HideStackFramesError; |
| 432 | } |
| 433 | |
| 434 | function makeNodeErrorWithCode(Base, key) { |
| 435 | const msg = messages.get(key); |
no outgoing calls
no test coverage detected
searching dependent graphs…