cli/lib/errors.js
function formErrorText (info, msg) {
  const hr = '----------'

  return addPlatformInformation(info)
  .then((obj) => {
    const formatted = []

    function add (msg) {
      formatted.push(
        stripIndents(msg)
      )
    }

    add(`
      ${obj.description}

      ${obj.solution}

    `)

    if (msg) {
      add(`
        ${hr}

        ${msg}

      `)
    }

    add(`
      ${hr}

      ${obj.platform}
    `)

    if (obj.footer) {
      add(`

        ${hr}

        ${obj.footer}
      `)
    }

    return formatted.join('\n\n')
  })
}
function formErrorText (info, msg) {
  const hr = '----------'

  return addPlatformInformation(info)
  .then((obj) => {
    const formatted = []

    function add (msg) {
      formatted.push(
        stripIndents(msg)
      )
    }

    add(`
      ${obj.description}

      ${obj.solution}

    `)

    if (msg) {
      add(`
        ${hr}

        ${msg}

      `)
    }

    add(`
      ${hr}

      ${obj.platform}
    `)

    if (obj.footer) {
      add(`

        ${hr}

        ${obj.footer}
      `)
    }

    return formatted.join('\n\n')
  })
}
function formErrorText ( info , msg ) { const hr = '----------' return addPlatformInformation ( info ) . then ( ( obj ) => { const formatted = [ ] function add ( msg ) { formatted . push ( stripIndents ( msg ) ) } add ( ` ${ obj . description } ${ obj . solution } ` ) if ( msg ) { add ( ` ${ hr } ${ msg } ` ) } add ( ` ${ hr } ${ obj . platform } ` ) if ( obj . footer ) { add ( ` ${ hr } ${ obj . footer } ` ) } return formatted . join ( '\n\n' ) } ) }
Forms nice error message with error and platform information,
and if possible a way to solve it. Resolves with a string.
Forms nice error message with error and platform information and if possible a way to solve it . Resolves with a string .