About the LastErrorText property
Most Chilkat classes have a LastErrorText property. It contains detailed contextual information about what transpired in the last method called on an object instance.
The LastErrorText will contain information even when the method succeeds. This allows us to understand what happened when a method succeeds, but for some reason doesn’t behave as expected.
Important: Each time a method is called, the contents of the LastErrorText are replaced with the information for the new method call. Thus the meaning of “Last” in LastErrorText.
When you look at the LastErrorText, the standard information at the beginning shows the name of the method call to which it applies, and also information such as the version of Chilkat, programming language, operating system, and CPU architecture.
Also, all Chilkat classes that have a LastErrorText property will also have a VerboseLogging property. You can set the object.VerboseLogging = true (or whatever “true” is in your programming language) to get more detailed information. This is useful for debugging.
For example, here is the LastErrorText for a successful call to Ftp2.Disconnect. Notice how the method name (in this case “Disconnect”) is shown at the very beginning.
ChilkatLog: Disconnect(16ms): DllDate: Jun 28 2024 ChilkatVersion: 9.5.0.99 UnlockPrefix: *** UnlockStatus: 2 Architecture: Little Endian; 32-bit Language: ActiveX VerboseLogging: 1 Disconnect: simpleCommand: sendCommand: sendingCommand: QUIT --sendCommand readCommandResponse: replyLineQP: 221 Goodbye. commandResponse: 221 Goodbye. statusCode: 221 --readCommandResponse --simpleCommand --Disconnect terminateConnection(16ms): TCP connection cleanly closed by peer. Cleanly terminated TCP connection. --terminateConnection Success. --Disconnect --ChilkatLog