The custom error type that extends Error.
The original error or error message to wrap.
A function that takes an optional message and returns an instance of the custom error type.
An instance of the custom error type with the original message and stack trace.
Wraps an error in a custom error type using a callback function.