Error Directive, Alerting & Logging Commands

Error Directive, Alerting & Logging Commands

OnError

Controls the processing of a script in the event of a runtime error.

Multiple OnError commands may be used to control behaviour at different points in the script.

Syntax Diagram

Parameters

  • Terminate - stop script execution

  • Continue - continue script execution after error

  • AlertUser - Inform the user of the error

Example

OnError Terminate AlertUser


AlertInfo / AlertError

Displays a message box to the user in the notification panel.

  • AlertInfo shows an information icon in the notification.

  • AlertError shows an error icon in the notification.

Syntax Diagram

Parameters

alertMessage (Mandatory)

The body of the message.

alertCaption (Optional)

A caption above the message body.

Example

AlertInfo "Username is " bmUsername, bmTitle

If bmUsername is “ksmith” and bmTitle is “Acme CMS” then, on Windows 7, this will show

Alert-Win7

Windows 10 messages are similar, but include the name of the application that created the message. In this case “My1Login Desktop Agent”.

AlertInfo "Hello from " bmTemplateName, "My1Login Desktop Message"

Alert-Win10


LogInfo / LogError

Writes a message to the desktop agent’s log file with a log level of Info or Error.

Syntax Diagram

Parameters

concatenatedStringParameter (Mandatory)

The message content.

May be String (Text) Literals or Bookmark & Template Attributes.

Examples

LogInfo "Starting " bmTitle " as " bmUserName

LogError "Some error"