Home News DOC Class DL Others Rice
Class  >  switch  >  StopWithException(bool)
switch 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 LCHandler(dictionary dic)

3:

... // event handler code.

4:

endmethod

5:

endclass

Usage of the StopWithException setter is as follows.

1:

browser b = new browser();

2:

handle h = new handle();

3:

switch sw = b.LoadCompleted(h,"LCHandler(dictionary)");

4:

sw.StopWithException = false; // Non-stop event handler.

5:

sw.ShowException = false; // It does not notify.

6:

sw.Start();

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

Therefore, even if there is a bug in the handler, event 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 event handling. Otherwise, returns false.

The defalut is true.

Links for reference

None

Copyright © Rice All rights reserved.