Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixup! fs: improve fs.watch ENOSPC error message
  • Loading branch information
addaleax committed Sep 11, 2018
commit 310fdd41efe6973c004ad8bc4ad65bd2ceb46001
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