GemSwapOptionsErrorclass
Typed error for invalid settings or a board that cannot be generated safely.
Import it
import { GemSwapOptionsError } from "@johnmorrisdotca/houseki/gem-swap";
Definition
class GemSwapOptionsError
new GemSwapOptionsError(code: string, message: string): GemSwapOptionsError
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 { GemSwapOptionsError } from "@johnmorrisdotca/houseki/gem-swap";
const error=new GemSwapOptionsError("docs-example","Invalid example setup");
console.log(error.name,error.code,error.message);GemSwapOptionsError docs-example Invalid example setupWhat it prints (run when this page was built)