timer クラス : IsError ゲッタ
説明
ハンドラの前回の実行で例外が発生したかどうかを示す値を返します。
構文
instance.IsError
引数
無し。
返り値
| クラス | 説明 |
| bool | ハンドラの前回の実行で例外が発生したかどうかを示す値。 |
サンプルコード
次のクラス定義があるとします。
| 1: | class handle |
| 2: | open method void THandler(dictionary dic) |
| 3: | throw "exception"; // Exception occurs. |
| 4: | endmethod |
| 5: | endclass |
IsError ゲッターの使い方は次のとおりです。
| 1: | handle h = new handle(); |
| 2: | timer tim = new timer(h,"THandler(dictionary)", 1000); |
| 3: | tim.StopWithException = false; // Non-stop timer handler. |
| 4: | tim.ShowException = false; // No error message dialog. |
| 5: | tim.Start(); // Start timer handler. |
| 6: | sleep slp. |
| 7: | slp.Freeze(10000); // It wait 10sec, the handler will be called and an exception will be thrown. |
| 8: | bool occur = tim.IsError; // It returns true because the handler will throw exception. |
注意
ハンドラの前回の実行で例外が発生した場合は true を返します。それ以外の場合は false を返します。
参照リンク
無し。


