Show/Hide Toolbars

Inventu Viewer+ .NET Programmer's Reference

Navigation: Exceptions

SCRecogException

Scroll Prev Top Next More

 

Use SCRecogException to catch an exception when a screen transition does not match an expected screen. The constructor information below is given for information purposes only - it should not be necessary to throw this exception yourself.

 

.NET CONSTRUCTOR

FSCProLib.SCRecogException()

FSCProLib.SCRecogException(string message)

FSCProLib.SCRecogException(string message,string screenList,

                 string screenActive)

FSCProLib.SCRecogException(string message,

                 System.Exception innerException)

 

Arguments

 

message

 The message given as a parameter in the waitForScreen method, or the default  name or index of the screen map definition.

screenList

 The list of screen names expected by the waitForScreen method.

activeScreen

 The name of the active screen before the waitForScreen method was executed.

innerException

 The exception that is the cause of the current exception.

 

Remarks

 

The SCRecogException is thrown when a screen transition does not result in a screen from the expected list.

 

The value of the message property will be from the waitForScreen statement, or the special registry key:

 HKEY_LOCAL_MACHINE/Software/[Invnetu|Flynet]/Viewer/FSCProLib:WaitErrorText

 

RegWaitError

 

The entry above would return the following text in the message property if an expected screen was not found (in this example "Start" was found instead of "end"):

 

HostScreen.waitForScreen: waitForScreen: Timed-out without any screens in list: "end". Screen Start is currently displayed, error tag=The expected screen was not found.

 

SCRecogException is derived from Application.Exception which in turn is derived from System.Exception.

 

SCRecogException extends the Exception interface by adding two properties:

1.activeScreen - the name of the screen active when the waitForScreen method timed out.
2.screenList - the list of screens given to the waitForScreen method. The exception is thrown because the current screen does not match one in this list.

 

The SCRecogException class is meant to be used when handling screen transitioning. For example, in navigation code the exception can be caught and the unexpected screen dealt with in the appropriate manner, and in the "local" section of code. More serious errors can then be caught higher up in the hierarchy. The SCException can be used to catch more general errors. Finally, higher in the hierarchy a System.Exception can be caught, the error logged, and then a clean exit can be performed. At this stage any errors that could be dealt with cleanly should already have been dealt with which means that the error is something unknown and most likely fatal.

 

Requirements

 

Inventu Viewer+

 

See Also

 

Exceptions | SCException | waitForScreen

 

 


 

© 2022 Inventu Corporation