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
| Name | Type | Description |
|---|---|---|
code | string | The native stable error code used by callers to distinguish setup or replay failures. |
message | string | The human-readable diagnostic accompanying the native code. |
Members
| Name | Type | Description |
|---|---|---|
code | string | |
name | string | |
message | string | |
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 setupWhat it prints (run when this page was built)