Skip to content

Commit

Permalink
change handling err to throw exception
Browse files Browse the repository at this point in the history
  • Loading branch information
manidlou committed Feb 5, 2017
1 parent 5a34abc commit 7c55a77
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
1.1.1 / 2017-02-05
------------------

- changed handling error to throw the exception

1.1.0 / 2017-01-25
------------------

- switched from [multimatch](https://github.com/sindresorhus/multimatch) to [micromatch](https://github.com/jonschlinkert/micromatch) for matching ignore patterns (showed faster performance)
- bug fixed: normalize root directory to make sure always return absolute paths.

1.0.2 / 2017-01-17
------------------

- initial release

2 changes: 1 addition & 1 deletion klaw-sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function walkSync (dir, opts, list) {
ignore = mm(files, opts.ignore)
}
} catch (er) {
return er
throw er
}
files.forEach(function (file) {
if (ignore.length > 0) {
Expand Down
2 changes: 0 additions & 2 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ describe('klaw-sync', function () {
klawSync('dirDoesNotExist/')
} catch (err) {
assert.equal(err.code, 'ENOENT')
} finally {
done()
}
})
Expand All @@ -52,7 +51,6 @@ describe('klaw-sync', function () {
klawSync(FILES[0])
} catch (err) {
assert.equal(err.code, 'ENOTDIR')
} finally {
done()
}
})
Expand Down

0 comments on commit 7c55a77

Please sign in to comment.