NatureOptionsErrorクラス
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A typed native grid, cell, marking or power-drop validation error.
インポート
import { NatureOptionsError } from "@johnmorrisdotca/houseki/nature";
定義
class NatureOptionsError
new NatureOptionsError(code: NatureErrorCode, message: string): NatureOptionsError
引数
| 名前 | 型 | 説明 |
|---|---|---|
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. |
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
code | NatureErrorCode | |
name | string | |
message | string | |
stack (省略可) | string | undefined | |
cause (省略可) | unknown |
例
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 setup出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。