API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

C

classAssetCacheError

@codexo/exojs / assets / stable

Structured asset-cache failure. Raised by a CacheStore for every operation it could not carry out, and dispatched on Loader.onCacheError whenever a CachePolicy degrades one instead of propagating it. A cache MISS is not one of these - it is reported as an AssetCacheMissError or as a miss result, because "this was never written" and "the store is broken" call for different reactions. Extends Error, so callers can narrow with `error instanceof AssetCacheError` and read AssetCacheError.operation, AssetCacheError.store and AssetCacheError.key instead of matching on message text. The original `DOMException` stays reachable through Error.cause, which is what makes a quota failure (`QuotaExceededError`) distinguishable from a transaction or schema failure. The `DOMException`'s `name` and message are also appended to Error.message, so a log line that only prints the message still names the real cause.

7
props
0
methods
0
events
Import
import { AssetCacheError } from '@codexo/exojs'

Structured asset-cache failure. Raised by a CacheStore for every operation it could not carry out, and dispatched on Loader.onCacheError whenever a CachePolicy degrades one instead of propagating it.

A cache MISS is not one of these - it is reported as an AssetCacheMissError or as a miss result, because "this was never written" and "the store is broken" call for different reactions.

Extends Error, so callers can narrow with `error instanceof AssetCacheError` and read AssetCacheError.operation, AssetCacheError.store and AssetCacheError.key instead of matching on message text. The original `DOMException` stays reachable through Error.cause, which is what makes a quota failure (`QuotaExceededError`) distinguishable from a transaction or schema failure.

The `DOMException`'s `name` and message are also appended to Error.message, so a log line that only prints the message still names the real cause.

Constructors1
Properties7
cause?: unknown
key: null | string
Record key, or null when the operation does not target a single record.
message: string
name: string
stack?: string
store: null | string
Storage namespace, or null when the operation is store-wide.
Source