Skip to content

Commit 310fdd4

Browse files
committed
fixup! fs: improve fs.watch ENOSPC error message
1 parent 73f4325 commit 310fdd4

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

lib/internal/errors.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ function getMessage(key, args) {
244244
*/
245245
function uvException(ctx) {
246246
const [ code, uvmsg ] = errmap.get(ctx.errno);
247-
let message = `${code}: ${ctx.description || uvmsg}, ${ctx.syscall}`;
247+
let message = `${code}: ${ctx.message || uvmsg}, ${ctx.syscall}`;
248248

249249
let path;
250250
let dest;

lib/internal/fs/watchers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ FSWatcher.prototype.start = function(filename,
167167
errno: err,
168168
syscall: 'watch',
169169
path: filename,
170-
description: err === UV_ENOSPC ?
170+
message: err === UV_ENOSPC ?
171171
'System limit for number of file watchers reached' : ''
172172
});
173173
error.filename = filename;

test/sequential/test-fs-watch-system-limit.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ spawnProcesses();
3737
let accumulated = '';
3838
gatherStderr.on('data', common.mustCallAtLeast((chunk) => {
3939
accumulated += chunk;
40-
// console.log(chunk);
4140
if (accumulated.includes('Error:') && !finished) {
4241
assert(
4342
accumulated.includes('ENOSPC: System limit for number ' +

0 commit comments

Comments
 (0)