effect-motion
API ReferencethreeClasses

ThreeException

A three.js operation failed.

Class: ThreeException

Defined in: packages/three/src/ThreeException.ts:16

A three.js operation failed.

Remarks

Every fallible call in this package reports through this one error type, so a caller catches by tag rather than guarding each three API separately. operation names which call failed — "WebGPURenderer.init", "readRenderTargetPixelsAsync" — and cause carries whatever three threw or rejected with.

Typical causes are environmental rather than logical: no WebGPU adapter, a lost device, a shader that failed to compile.

Extends

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

Constructors

Constructor

new ThreeException(args): ThreeException;

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

Parameters

ParameterTypeDescription
args{ cause?: unknown; operation?: string; }-
args.cause?unknownThe underlying error three threw or rejected with.
args.operation?stringName of the three.js operation that failed.

Returns

ThreeException

Inherited from

Data.TaggedError("ThreeException")<{
	/ The underlying error three threw or rejected with. /
	cause?: unknown;
	/ Name of the three.js operation that failed. /
	operation?: string;
}>.constructor

Properties

cause?

optional cause?: unknown;

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

The underlying error three threw or rejected with.

Inherited from

Data.TaggedError("ThreeException").cause

operation?

readonly optional operation?: string;

Defined in: packages/three/src/ThreeException.ts:20

Name of the three.js operation that failed.

Inherited from

Data.TaggedError("ThreeException").operation

On this page