Skip to content

API reference / @jsprismarine/blocks / BlockError

Class: BlockError ​

Defined in: packages/blocks/src/errors.ts:12

Thrown for a programming mistake against this package's interface: a state name the block does not carry, a runtime id outside the palette, a palette built with a duplicate identifier.

Bad pack data is not an error. It comes back as a Diagnostic so one broken file cannot stop a load, which is the rule @jsprismarine/packs and @jsprismarine/content already follow.

Extends ​

Constructors ​

Constructor ​

new BlockError(message?): BlockError

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1080

Parameters ​

message? ​

string

Returns ​

BlockError

Inherited from ​

ContentError.constructor

Constructor ​

new BlockError(message?, options?): BlockError

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1080

Parameters ​

message? ​

string

options? ​

ErrorOptions

Returns ​

BlockError

Inherited from ​

ContentError.constructor

Properties ​

name ​

name: string = 'BlockError'

Defined in: packages/blocks/src/errors.ts:13

Overrides ​

ContentError.name