MCPcopy Create free account
hub / github.com/ICBNetwork/web3-Wallet / defaultGetStackString

Function defaultGetStackString

ses.cjs:1765–1775  ·  view source on GitHub ↗
(error)

Source from the content-addressed store, hash-verified

1763 * @returns {string}
1764 */
1765const 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} */
1778const loggedErrorHandler= {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected