ErrorWrapper.create method
ErrorWrapper › create
Normalizes any thrown value to anError.Returns the value unchanged if it is already an
Error, otherwise wraps it in an ErrorWrapper.Signature:
create(thrownValue: unknown): ErrorParameters:
| Parameter | Type | Description |
|---|---|---|
| thrownValue | unknown | The thrown value to normalize. |
Returns: Error — An Error instance: the original value if it is already an Error, otherwise an ErrorWrapper.