Managing Errors

This page discusses:

DisableErrors

Function used to deactivate all the script lines following errors. Errors that occur in an EKL script after you called DisableErrors is stored in a list.

Signature

DisableErrors([iDisableErrors : Boolean, iDisableWarnings : Boolean, iDisableInformations : Boolean])

Arguments

NameInput / OutputRequired?TypeComment
iDisableErrorsInNoBooleanLet you disable information messages only.
iDisableWarningsInNoBooleanLet you disable warning messages only.
iDisableInformationsInNoBooleanLet you disable error messages only.

Example

let resourceToFind(Feature)
let resourceName(String)
let listOfErrors(List)
[…]
DisableErrors()
resourceToFind = AccessResource(resourceName, "Feature")
listOfErrors = EnableErrors()

if resourceToFind == NULL
{
                /* Treat the case where the resource was not found */
                […]
}

EnableErrors

Function used to re-activate errors and retrieve those that occurred after you called DisableErrors. It returns a list containing EvaluationError objects corresponding to the errors raised by DisableErrors.

Signature

EnableErrors() : List

ReturnType

List

Example

let resourceToFind(Feature)
let resourceName(String)
let listOfErrors(List)
[…]
DisableErrors()
resourceToFind = AccessResource(resourceName, "Feature")
listOfErrors = EnableErrors()

if resourceToFind == NULL
{
                /* Treat the case where the resource was not found */
                […]
}