Constructor
new Err(plugin, msg, …argsopt)
Parameters:
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
app :App
The app instance
Type:
- Source
message :string
Translated message
Type:
- string
- Source
orgMessage :string
Original message before translation
Type:
- string
- Source
payload :Object
Error payload extracted from the last arguments
Type:
- Object
- Source
plugin :Plugin
Attached plugin
Type:
- Source
Methods
fatal()
Print instance on console and terminate process
- Source
formatErrorDetails(value) → {Object}
Pretty format error details
Parameters:
Name | Type | Description |
---|---|---|
value | Object | Value to format |
- Source
Returns:
- Type:
- Object
write() → {Err}
Write message to the console
- Source
Returns:
Error object, usefull for chaining
- Type:
- Err