Skip to content

API reference / @jsprismarine/errors / blocks / BlockError

Abstract Class: BlockError ​

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

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 ​

code ​

abstract readonly code: string

Defined in: packages/errors/src/JSPrismarineError.ts:36

The catalog code, such as LEVELDB_DATABASE_LOCKED. It never changes between releases.

Inherited from ​

ContentError.code


docs ​

abstract readonly docs: string

Defined in: packages/errors/src/JSPrismarineError.ts:37

The address of this error's entry in the error reference.

Inherited from ​

ContentError.docs


name ​

name: string = 'BlockError'

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

Overrides ​

ContentError.name


params ​

abstract readonly params: Readonly<Record<string, unknown>>

Defined in: packages/errors/src/JSPrismarineError.ts:38

The placeholder values the message was built from.

Inherited from ​

ContentError.params

Accessors ​

[cataloged] ​

Get Signature ​

get [cataloged](): true

Defined in: packages/errors/src/JSPrismarineError.ts:40

Returns ​

true

Inherited from ​

ContentError.[cataloged]