API reference

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

C

classAssetDecodeError

@codexo/exojs / assets / stable

Raised when bytes that were successfully obtained cannot be turned into a resource: a malformed container index, an XML document the parser rejected, audio the browser could not decode, an empty buffer. Distinct from AssetNetworkError and AssetCacheError because the reaction differs: a transport failure is worth retrying and a cache failure is worth ignoring, while broken content stays broken - the asset has to be dropped or the file fixed. Narrow with `error instanceof AssetDecodeError`; the decoder's own error stays reachable through Error.cause.

5
props
0
methods
0
events
Import
import { AssetDecodeError } from '@codexo/exojs'

Raised when bytes that were successfully obtained cannot be turned into a resource: a malformed container index, an XML document the parser rejected, audio the browser could not decode, an empty buffer.

Distinct from AssetNetworkError and AssetCacheError because the reaction differs: a transport failure is worth retrying and a cache failure is worth ignoring, while broken content stays broken - the asset has to be dropped or the file fixed. Narrow with `error instanceof AssetDecodeError`; the decoder's own error stays reachable through Error.cause.

Constructors1
Properties5
assetType: null | string
Asset type id the bytes were being decoded for, or null when the decoder is type-agnostic.
cause?: unknown
message: string
name: string
stack?: string
Source