Custom error class that extends the built-in Error class. It is used as a base class for creating custom error types in your application.
Creates a new instance of the BaseError class with the specified error message.
The type of the error.
The error message describing the reason for the error.
The error message.
The name of the error.
Optional
Returns serialized error object.
The serialized error object.
Returns a string representation of the error message, prefixed with "[]".
A formatted error message.
Custom error class that extends the built-in Error class. It is used as a base class for creating custom error types in your application.