ExitFunction

The ExitFunction keyword ends the execution of the active know-how function and returns back to the calling script. It is used to handle error scenarios in know-how functions when the situation becomes impossible to recover. Available on the client only.

Examples

The following script calls the know-how function from an EKL action with the ExitFunction keyword:

Notify("Entered inside the EKL Function")
if number == 0{
      Notify("Before the exitfunction inside Function")
      ToReturn = 123
      exitfunction
      Notify("After the exitfunction inside Function")
}
Notify("Exit from the EKL Function")
include "TestLibrary"
Let i(Integer)
Notify("Enter the main EKL Action.1")
Notify("Call to EKL Function from main Action.1")
i = TestLibrary::TestExitFunction(0)
Notify("Back to main Action.1 after EKL Function call")
Notify("ToReturn value from EKL Function :#",i)
Notify("Exit the main EKL Action.1")
Output
Enter the main EKL Action.1
Call to EKL Function from main Action.1
Entered inside the EKL Function
Before the exitfunction inside Function
Back to main Action.1 after EKL Function call
ToReturn value from EKL Function : 123
Exit the main EKL Action.1