SetErrorLine Method
Applies To
BasicTcl Object, AdvancedTcl Object
Prototype
SetErrorLine(Interpreter As Long, ErrorLine As Long) As Long
Input
The "Interpreter" parameter, which must be a valid interpreter pointer. The "ErrorLine" parameter, which is the desired error line number for the specified interpreter.
Output
None.
Returns
Undefined.
COM Results
S_OK: Success.
E_INVALIDARG: Either a NULL pointer was passed or the "Interpreter" parameter is invalid.
Side Effects
The current error line number for the specified interpreter is set to the value of the "ErrorLine" parameter.
Description
This method sets the error line number by directly modifying the Tcl_Interp structure.
Notes
None.
Example
Private Sub Command1_Click()
    Dim poTcl As TclBridge.BasicTcl
    Dim plInterpreter As Long
    Dim plErrorLine As Long

    Set poTcl = New TclBridge.BasicTcl

    Call poTcl.CreateInterpreter(plInterpreter)

    Call poTcl.SetErrorLine(plInterpreter, 1234&)

    Call poTcl.GetErrorLine(plInterpreter, plErrorLine)

    MsgBox "The error line = " & plErrorLine, vbInformation, App.Title

    Call poTcl.DeleteInterpreter(plInterpreter)

    Set poTcl = Nothing
End Sub