Skip to content

Consistent error messages in all modules #1220

Closed
@micnic

Description

@micnic

Based on PR #892 I want to propose to define some general rules for writing error messages. For the beginning, I propose the following rules:

  • Capitalized first word at the beginning of the message

TypeError: First argument should be a string or buffer

  • Quoted variable name

Error: "name" argument is required

  • Verbose message text

Error: Bad argument // instead of "bad arg" which is used now in SyncWriteStream.prototype.write
RangeError: "n" should be less than or equal to "kMaxLength"

cc @iojs/collaborators

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussIssues opened for discussions and feedbacks.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions