The Basic Concept of LastErrorText

There are a few important things about the LastErrorText:

1) Each Chilkat method call (or property access) clears the LastErrorText and writes new information about what transpired during the method call.  This information is available regardless of the success/failure of the method call.  Most Chilkat objects include a VerboseLogging property that controls whether more or less information is recorded.  Only use VerboseLogging for debugging situations as it may impact performance.  (Note: Some property accesses will not write anything to LastErrorText because the internal implementation is trivial and it could adversely affect performance, especially if the property is used in a “for” loop statement.)

2) Make sure to get the LastErrorText from the same object instance.  If interested in the LastErrorText after calling imap.FetchSingle, then get imap.LastErrorText.  (Not email.LastErrorText, or any other object instance.)

3) LastErrorText contains information about the last method call for an object instance.  (i.e. the most recently called method or property)  To get the information about what occurred during a call to imap.FetchSingle (for example), one must get the contents of the LastErrorText *before* calling any other method or property on the object.  (Thus the significance of the word “Last” in “LastErrorText”.)

4) The LastErrorText indicates the name of the method (or property) for which it contains information.  For example:


DllDate: Jan 19 2012
UnlockPrefix: NONE
Username: joe
Architecture: Little Endian; 32-bit
Language: ActiveX
Tags :