Reference · Shizen and Arashi environments
NatureOptionsErrorclass
A typed native grid, cell, marking or power-drop validation error.
Import it
import { NatureOptionsError } from "@johnmorrisdotca/houseki/nature";
Definition
class NatureOptionsError
new NatureOptionsError(code: NatureErrorCode, message: string): NatureOptionsError
Parameters
| Name | Type | Description |
|---|---|---|
code | NatureErrorCode | 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 | NatureErrorCode | |
name | string | |
message | string | |
stack (optional) | string | undefined | |
cause (optional) | unknown |
Examples
import { NatureOptionsError } from "@johnmorrisdotca/houseki/nature";
const error=new NatureOptionsError("invalid-grid-size","Invalid example setup");
console.log(error.name,error.code,error.message);NatureOptionsError invalid-grid-size Invalid example setupWhat it prints (run when this page was built)