(error)
| 1763 | * @returns {string} |
| 1764 | */ |
| 1765 | const defaultGetStackString= (error)=>{ |
| 1766 | if( !('stack'in error)) { |
| 1767 | return ''; |
| 1768 | } |
| 1769 | const stackString= `${error.stack}`; |
| 1770 | const pos= stringIndexOf(stackString, '\n'); |
| 1771 | if( stringStartsWith(stackString, ' ')|| pos=== -1) { |
| 1772 | return stackString; |
| 1773 | } |
| 1774 | return stringSlice(stackString, pos+ 1); // exclude the initial newline |
| 1775 | }; |
| 1776 | |
| 1777 | /** @type {LoggedErrorHandler} */ |
| 1778 | const loggedErrorHandler= { |
nothing calls this directly
no outgoing calls
no test coverage detected