timer class : ShowException(bool) setter

Description

Sets a value that indicates whether to display the error messages.

Syntax

instance.ShowException = value;

Arguments

ClassDescription
boolWhether to display the error messages.

Return value

None

Sample code

Suppose you have the following class definition.

1:

class handle

2:

open method void THandler(dictionary dic)

3:

throw "exception"; // Exception occurs.

4:

endmethod

5:

endclass

Usage of the ShowException setter is as follows.

1:

handle h = new handle();

2:

timer tim = new timer(h,"THandler(dictionary)", 1000);

3:

tim.ShowException = false; // No error message dialog.

4:

tim.Start(); // Start timer handler.

In the above code, the handler is called after the set time has elapsed.

An exception raises in the handler, but the error message dialog is not displayed.

Notes

Sets a value that indicates whether to display the error messages if an exception occurs in the handler.

Sets true if you want to display the error messages. Otherwise, sets false.

The defalut is true.

Links for reference

None

Copyright © Cooker All rights reserved.