Constructor
new Err(plugin, msg, …argsopt)
Constructor.
| Name | Type | Attributes | Description |
|---|---|---|---|
plugin | Plugin | Plugin instance | |
msg | string | Error message | |
args | any | <optional> <repeatable> | Variables to interpolate with error message. Payload object can be pushed at the very last argument |
- Source
Members
message :string
Translated message.
- string
- Source
orgMessage :string
Original message before translation.
- string
- Source
payload :Object
Error payload extracted from the last arguments.
- Object
- Source
Methods
fatal()
Print instance on console and terminate process.
- Source
formatErrorDetails(value) → {Object}
Pretty format error details.
Formatted error will be applied directly to the value parameter, and a detailsMessage will be returned for display purpose.
| Name | Type | Description |
|---|---|---|
value | Object | Value to format |
- Source
- Type:
- Object
write() → {Err}
Write message to the console.
- Source
- Error object, useful for chaining
- Type:
- Err