(error, detailsNote)
| 1733 | |
| 1734 | /** @type {AssertNote} */ |
| 1735 | const note= (error, detailsNote)=> { |
| 1736 | if( typeof detailsNote=== 'string') { |
| 1737 | // If it is a string, use it as the literal part of the template so |
| 1738 | // it doesn't get quoted. |
| 1739 | detailsNote= redactedDetails([detailsNote]); |
| 1740 | } |
| 1741 | const hiddenDetails= weakmapGet(hiddenDetailsMap, detailsNote); |
| 1742 | if( hiddenDetails=== undefined) { |
| 1743 | throw TypeError( `unrecognized details ${quote(detailsNote)}`); |
| 1744 | } |
| 1745 | const logArgs= getLogArgs(hiddenDetails); |
| 1746 | const callbacks= weakmapGet(hiddenNoteCallbackArrays, error); |
| 1747 | if( callbacks!== undefined) { |
| 1748 | for( const callback of callbacks) { |
| 1749 | callback(error, logArgs); |
| 1750 | } |
| 1751 | }else { |
| 1752 | addLogArgs(error, logArgs); |
| 1753 | } |
| 1754 | }; |
| 1755 | freeze(note); |
| 1756 | |
| 1757 | /** |
nothing calls this directly
no test coverage detected