effect-motion
API Referenceeffect-motionClasses

EffectMotionError

The library's error type, raised when something outside the engine fails.

Class: EffectMotionError

Defined in: packages/motion/src/EffectMotionError.ts:19

The library's error type, raised when something outside the engine fails.

Remarks

Used at the boundaries where the outside world can go wrong — fetching a font, decoding an image, talking to the GPU. Because it is a tagged error, it appears in an Effect's error channel and can be caught by tag, rather than thrown.

Author mistakes inside a scene are deliberately NOT this: animating a field that has no value, or orbiting without a point of interest, fail loudly as defects, because they are bugs to fix rather than conditions to handle.

cause carries the underlying failure when there is one.

Extends

  • YieldableError<this> & { } & Readonly<{ cause: unknown; message: string; }>

Constructors

Constructor

new EffectMotionError(args): EffectMotionError;

Defined in: node_modules/.bun/effect@4.0.0-rc.115/node_modules/effect/dist/Data.d.ts:966

Parameters

ParameterType
args{ cause: unknown; message: string; }
args.causeunknown
args.messagestring

Returns

EffectMotionError

Inherited from

Data.TaggedError("EffectMotionError")<{
	readonly message: string;
	readonly cause: unknown;
}>.constructor

Properties

cause

cause: unknown;

Defined in: node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts:26

Inherited from

Data.TaggedError("EffectMotionError").cause

message

message: string;

Defined in: node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1077

Inherited from

Data.TaggedError("EffectMotionError").message

Methods

of()

static of(message, cause?): EffectMotionError;

Defined in: packages/motion/src/EffectMotionError.ts:24

Build an error with a message and an optional underlying cause.

Parameters

ParameterType
messagestring
cause?unknown

Returns

EffectMotionError

On this page