Skip to content

Commit

Permalink
fixup! fs: improve fs.watch ENOSPC error message
Browse files Browse the repository at this point in the history
  • Loading branch information
addaleax committed Sep 11, 2018
1 parent 73f4325 commit 310fdd4
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/internal/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ function getMessage(key, args) {
*/
function uvException(ctx) {
const [ code, uvmsg ] = errmap.get(ctx.errno);
let message = `${code}: ${ctx.description || uvmsg}, ${ctx.syscall}`;
let message = `${code}: ${ctx.message || uvmsg}, ${ctx.syscall}`;

let path;
let dest;
Expand Down
2 changes: 1 addition & 1 deletion lib/internal/fs/watchers.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ FSWatcher.prototype.start = function(filename,
errno: err,
syscall: 'watch',
path: filename,
description: err === UV_ENOSPC ?
message: err === UV_ENOSPC ?
'System limit for number of file watchers reached' : ''
});
error.filename = filename;
Expand Down
1 change: 0 additions & 1 deletion test/sequential/test-fs-watch-system-limit.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ spawnProcesses();
let accumulated = '';
gatherStderr.on('data', common.mustCallAtLeast((chunk) => {
accumulated += chunk;
// console.log(chunk);
if (accumulated.includes('Error:') && !finished) {
assert(
accumulated.includes('ENOSPC: System limit for number ' +
Expand Down

0 comments on commit 310fdd4

Please sign in to comment.