Home Notices Documents Classes Download Others Rice
Classes  >  ehswitch  >  IsError
ehswitch class : IsError getter

Description

Gets a value that indicates whether the last execution of the handler finished with the exception.

Syntax

ehswitchInstance.IsError

Arguments

None

Return value

ClassDescription
boolA value that indicates whether the last execution of the handler finished with the exception.

Sample code

Suppose you have the following class definition.

1:

class handle

2:

...

3:

open fitter handle()

4:

// any initialization code...

5:

endfitter

6:

...

7:

open method void handler(eventargs ea)

8:

// any handling code....

9:

endmethod

10:

...

11:

endclass

Usage of the IsError getter is as follows.

1:

browser b = new browser();

2:

message m;

3:

handle h = new handle();

4:

ehswitch ehs = b.Load(h,"handler(eventargs)");

5:

ehs.Start(); // Starts handling.

6:

...

7:

// The page loading failed.

8:

...

9:

if(ehs.IsError)

10:

list{string} errormessages = ehs.ErrorMessages;

11:

m.Show(errormessages);

12:

endif

Notes

Returns true if the execution of the handler finished with the exception. Otherwise, returns false.

Links for reference

None.

Copyright © Rice All rights reserved.