Closed
Description
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"
- Consistent usage of "should" vs "must" as mentioned by @timoxley Consistent error messages in all modules #892 (comment) to follow https://tools.ietf.org/html/rfc2119
cc @iojs/collaborators