GetStatusText Method for LCSession

This method returns the message text corresponding to an LCStatus code.

Defined In

LCSession

Syntax

message = thisSession. GetStatusText (errorCode)

Parameters

Value

Description

errorCode

Long, output, optional. The error code for which to return the message text. The default is the current status code.

Return Values

Value

Description

message

A text string representation of the status.

Example

Option Public
Uselsx "*lsxlc" 
Sub Initialize
  Dim session As New LCSession
  On Error Goto trap
  REM Purposely generate a Connector error.
  session.ListConnector (23)
  Print "No error encountered"
  Exit Sub
trap:
  If (session.Status <> LCSUCCESS) Then
    Print session.GetStatusText
  Else
    Print "No error exists."
  End If
  Exit Sub
End Sub

Example Output

Error: Invalid List direction