Initialize or call this function to throw an error.
Parameters:
Name | Type | Description |
---|---|---|
msg |
string | Error message |
- Source:
Example
// Throw an error with the message `Something failed`
new Err('Something failed');
// Or like this
Err('Something failed');