src/WrapperError.js
function formatError(error, stack) {
  if (origPrepareStackTrace) {
    return origPrepareStackTrace(error, stack);
  }
  return [
    error.toString(),
    stack
      .map(function (frame) {
        return 'at ' + frame.toString();
      })
      .map(padLeft)
      .join('\n')
  ].join('\n');
}
function formatError(error, stack) {
  if (origPrepareStackTrace) {
    return origPrepareStackTrace(error, stack);
  }
  return [
    error.toString(),
    stack
      .map(function (frame) {
        return 'at ' + frame.toString();
      })
      .map(padLeft)
      .join('\n')
  ].join('\n');
}
function formatError ( error , stack ) { if ( origPrepareStackTrace ) { return origPrepareStackTrace ( error , stack ) ; } return [ error . toString ( ) , stack . map ( function ( frame ) { return 'at ' + frame . toString ( ) ; } ) . map ( padLeft ) . join ( '\n' ) ] . join ( '\n' ) ; }
Creates and returns a string representation of an error.

@param {Error} error - The error.
@returns {String} - A string representation of the error.
Creates and returns a string representation of an error .