Skip to content

Commit

Permalink
add trace if debug, closes #102
Browse files Browse the repository at this point in the history
  • Loading branch information
joehand committed Jan 25, 2017
1 parent a4b57a4 commit c0c2e5c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/ui/exit.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
var debug = require('debug')('dat')

module.exports = function (log) {
return function (err) {
if (err) {
console.error(err)
if (debug.enabled) console.trace(err)
else console.error(err)
process.exit(1)
}
if (log) log.print()
Expand Down

0 comments on commit c0c2e5c

Please sign in to comment.