Skip to content

Confusing error message in fs.utils #32871

Closed
@force-net

Description

@force-net

throw new ERR_OUT_OF_RANGE('offset',

This check can produce confusing error message when offset is equal to bufferLength. Which is error, but message shows, that it is correct (<=)

if (offset < 0 || offset >= bufferLength) {
      throw new ERR_OUT_OF_RANGE('offset',
                                 `>= 0 && <= ${bufferLength}`, offset);
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-bugIssues with confirmed bugs.fsIssues and PRs related to the fs subsystem / file system.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions