timer クラス : StopWithException(bool) セッタ

説明

タイマー処理を停止するかどうかを示す値を設定します。

構文

instance.StopWithException = value;

代入値

クラス説明
boolタイマー処理を停止するかどうかを示す値。

返り値

無し。

サンプルコード

次のクラス定義があるとします。

1:

class handle

2:

open method void THandler(dictionary dic)

3:

... // timer handler code.

4:

endmethod

5:

endclass

StopWithException セッターの使い方は次のとおりです。

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; // It does not notify.

5:

tim.Start();

上記のコードでは、StopWithException、ShowException が共に false に設定されています。

このため、ハンドラにバグがある場合でも、例外の発生をユーザーに通知せずにタイマー処理は継続します。

注意

ハンドラで例外が発生した場合にタイマー処理を停止するかどうかのフラグです。

停止する場合は true を設定します。 それ以外の場合は false を設定します。

デフォルトは true です。

参照リンク

無し。

Copyright © Cooker All rights reserved.