timer class : StopWithException(bool) setter

Description

Sets a value that indicates whether to stop with the exception.

Syntax

instance.StopWithException = value;

Arguments

ClassDescription
boolWhether to stop with the exception.

Return value

None

Sample code

Suppose you have the following class definition.

1:

class handle

2:

open method void THandler(dictionary dic)

3:

... // timer handler code.

4:

endmethod

5:

endclass

Usage of the StopWithException setter is as follows.

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();

In the above code, StopWithException and ShowException are set to false.

Therefore, even if there is a bug in the handler, timer handling will continue without notifying that an exception has occurred.

Notes

Sets whether to stop if the exception occurs in the handler.

Sets true if you want to stop timer handling. Otherwise, returns false.

The defalut is true.

Links for reference

None

Copyright © Cooker All rights reserved.