Errors
asyncmux custom error classes are designed with internationalization (i18n) in mind, built upon the i18n-error-base framework.
ErrorBase
This is the base class for all asyncmux errors. It extends I18nErrorBase from i18n-error-base, providing support for errors with metadata and localized messages.
UnreachableError
An error used when "unreachable code" is executed. It is primarily used for exhaustiveness checking (the never type) or ensuring an exhaustive switch statement.
Metadata
{
value?: unknown;
}value
- Type:
unknown
The value that was supposed to be unreachable.
Troubleshooting
If this error occurs at runtime, it likely indicates that the user is utilizing asyncmux in a non-type-safe manner, or there is a bug within asyncmux itself.
DecoratorSupportError
An error thrown when the runtime environment does not support Stage 3 decorators.
Troubleshooting
You must use a runtime environment that supports Stage 3 decorators or provide a polyfill/implementation that simulates them.
LockReleasedError
This error is thrown when an attempt is made to release a lock that has already been released.
Troubleshooting
Ensure that the code does not attempt to release a lock that has already been released.