(key, args, self)
| 593 | } |
| 594 | |
| 595 | function getMessage(key, args, self) { |
| 596 | const msg = messages.get(key); |
| 597 | |
| 598 | if (typeof msg === 'function') { |
| 599 | assert( |
| 600 | msg.length <= args.length, // Default options do not count. |
| 601 | `Code: ${key}; The provided arguments length (${args.length}) does not ` + |
| 602 | `match the required ones (${msg.length}).`, |
| 603 | ); |
| 604 | return ReflectApply(msg, self, args); |
| 605 | } |
| 606 | |
| 607 | const expectedLength = getExpectedArgumentLength(msg); |
| 608 | assert( |
| 609 | expectedLength === args.length, |
| 610 | `Code: ${key}; The provided arguments length (${args.length}) does not ` + |
| 611 | `match the required ones (${expectedLength}).`, |
| 612 | ); |
| 613 | if (args.length === 0) |
| 614 | return msg; |
| 615 | |
| 616 | ArrayPrototypeUnshift(args, msg); |
| 617 | return ReflectApply(lazyInternalUtilInspect().format, null, args); |
| 618 | } |
| 619 | |
| 620 | let uvBinding; |
| 621 |
no test coverage detected
searching dependent graphs…