docs: function prepareStackTrace( error, structuredStackTrace ) {
    // If error already have a cached trace inside, just return that
    // happens on true errors most
    if ( error.__cachedTrace ) { return error.__cachedTrace; }
  
    const stackTrace = utils.createStackTrace( error, structuredStackTrace );
    error.__cachedTrace = utils.removeInternalFrames( filename, stackTrace );
  
    if ( !error.__previous ) {
      let previousTraceError = currentTraceError;
      while ( previousTraceError ) {
        const previousTrace = utils.removeInternalFrames( filename, previousTraceError.stack );
        // append old stack trace to the "cachedTrace"
        error.__cachedTrace += `${utils.separator}${utils.breakLn}${previousTraceError.__location}\n`;
        error.__cachedTrace += previousTrace.substring( previousTrace.indexOf( '\n' ) + 1 );
  
        previousTraceError = previousTraceError.__previous;
      }
    }
    return error.__cachedTrace;
  }