Skip to content

Commit

Permalink
fix: improve failure logging
Browse files Browse the repository at this point in the history
  • Loading branch information
garbados committed May 8, 2020
1 parent 06da50b commit bc890aa
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion bin.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env node
'use strict'

const assert = require('assert').strict
const readline = require('readline')

const CouchContinuum = require('.')
Expand Down Expand Up @@ -60,7 +61,7 @@ function catchError (error) {
} else if (error.code === 'EACCES') {
console.log('Could not access the checkpoint document. Are you running as a different user?')
} else {
console.log('Unexpected error: %j', error)
assert.fail(`Unexpected error: ${JSON.stringify(error)}`)
}
process.exit(1)
}
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const assert = require('assert')
const assert = require('assert').strict
const path = require('path')
const ProgressBar = require('progress')
const { URL, format: urlFormat } = require('url')
Expand Down
2 changes: 1 addition & 1 deletion test/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* globals describe, it, beforeEach, before, afterEach */

const assert = require('assert')
const assert = require('assert').strict
const CouchContinuum = require('..')
const request = require('../lib/request')
const { name, version } = require('../package.json')
Expand Down

0 comments on commit bc890aa

Please sign in to comment.