dthree / vorpal

Node's framework for interactive CLIs
http://vorpal.js.org
MIT License
5.64k stars 280 forks source link

Error stack trace is hidden when using promises #35

Closed pgherveou closed 8 years ago

pgherveou commented 8 years ago

The following just display a red Error: true instead of a full error logging

import vorpal from 'vorpal'

const program = vorpal()

program.command('foo')
  .action(function() {
  return Promise.reject(new Error('Bouu'))
})

program
  .delimiter(`jogabo:work$`)
  .show()
scotthovestadt commented 8 years ago

It looks like the error object is just appended to the string: 'Error: ' + err. Probably need to look at the object and do more than typecast it.

dthree commented 8 years ago

Spot on, Scott. All good now. :+1:

pgherveou commented 8 years ago

Cool well done

Sent from my iPhone

On Oct 30, 2015, at 7:28 PM, dc notifications@github.com wrote:

Spot on, Scott. All good now.

— Reply to this email directly or view it on GitHub.