Skip to the content

Houseki宝石

Run five native gem and stone engines, play measured challenges and lessons, and save deterministic games.

Houseki (宝石) is Japanese for a gem or precious stone. About the name

Contents

Reference · Magnetic Blocks

MagneticBlocksOptionsErrorclass

A typed native magnetic-block setup validation error.

Import it

import { MagneticBlocksOptionsError } from "@johnmorrisdotca/houseki/magnetic-blocks";

Definition

class MagneticBlocksOptionsError
new MagneticBlocksOptionsError(code: string, message: string): MagneticBlocksOptionsError

Parameters

NameTypeDescription
codestring

The native stable error code used by callers to distinguish setup or replay failures.

messagestring

The human-readable diagnostic accompanying the native code.

Members

NameTypeDescription
codestring
namestring
messagestring
stack (optional)string | undefined
cause (optional)unknown

Examples

import { MagneticBlocksOptionsError } from "@johnmorrisdotca/houseki/magnetic-blocks";

const error=new MagneticBlocksOptionsError("docs-example","Invalid example setup");
console.log(error.name,error.code,error.message);
MagneticBlocksOptionsError docs-example Invalid example setup

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/houseki 0.4.2.