timer クラス : ErrorMessages ゲッタ
説明
前回のハンドラの実行で発生したエラーメッセージのリストを返します。
構文
instance.ErrorMessages
引数
無し。
返り値
| クラス | 説明 |
| List{string} | 前回のハンドラの実行で発生したエラーメッセージのリスト。 |
サンプルコード
次のクラス定義があるとします。
| 1: | class handle |
| 2: | open method void THandler(dictionary dic) |
| 3: | throw "exception"; // Exception occurs. |
| 4: | endmethod |
| 5: | endclass |
ErrorMessages ゲッターの使い方は次のとおりです。
| 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.OneShot(); // Start timer handler just once. |
| 6: | sleep slp. |
| 7: | slp.Freeze(10000); // It wait 10sec, the handler will be called and an exception will be thrown. |
| 8: | message m; |
| 9: | m.Show(tim.ErrorMessages); // It show error-messages. |
注意
前回のハンドラの実行中に発生した例外のうち、try文によってキャッチされなかった例外のエラーメッセージを返します。
全ての例外が try文によってキャッチされた場合、またはハンドラの実行が正常に完了した場合は、空の list{string} が返されます。
参照リンク
無し。


