Class: RuntimeError
Class: RuntimeError
Class representing a RuntimeError.
Author
Mr. Stone evensstone@gmail.com
Extends
Error
Extended by
Constructors
Constructor
new RuntimeError(message, options): RuntimeError;
Create a RuntimeError.
Parameters
message
string
The message to log.
options
ErrorOptions
= {}
The error options.
Returns
RuntimeError
Overrides
Error.constructor
Properties
cause?
readonly optional cause: Error;
Overrides
Error.cause
code?
readonly optional code: string;
metadata?
readonly optional metadata: unknown;
Methods
toString()
toString(multiline): string;
Converts the error to a formatted string representation.
Parameters
multiline
boolean
= false
Determine if output value must be multiline or not.
Returns
string
A formatted error string.
create()
static create<T>(message, options): T;
Create a RuntimeError.
Type Parameters
T
T
extends RuntimeError
= RuntimeError
Parameters
message
string
options
ErrorOptions
= {}
The options to create a RuntimeError.
Returns
T
A new RuntimeError instance.