JVCL Help:TJvDebugHandler.OnOtherDestination
JVCL Help: TJvDebugHandler.OnOtherDestination Property
Search in JVCL Help
Search in all projectsSummary
Write here a summary (1 line)
Pascal
propertyOnOtherDestination: TNotifyEvent;
Description
Is the only event provided. When assigned, by double-clicking it in the object inspector, a procedure of this name will be created for you in your mainform's unit. Any code you write here will be run immediately upon any exception information being generated, before and completely independent of the component's own logfile and whether or not "CreateLogFile" is set to True or False.
From here you may access the "ExceptionSgtringList" which holds this information and do with it as wanted. You may for example, have the "ExceptionStringList" saved to another logfile, or to another utility application such as CodeSite.
Please note that the "ExceptionStringList" is created and freed properly by the component itself...you need only access it if wanted. Also note that even though "AppendLogFile" may be set to True, this property ONLY applies to the component's own logfile. When the "ExceptionStringList" is accessed from within the "OnOtherDestination" method, it is holding ONLY the current exception's information. To use this information in an appended form, it will be necessary to write such code as necessary. As an example: You could, within this method, create a second stringList of your own and assign the "ExceptionStringList's" lines to it each time the event fires. Finally, as an example of how CodeSite users can easily make use of the exception information, the code as written below and added to "OnOtherDestination" method is all that is needed:
For CodeSite 2: If CodeSite.Enabled = True Then
CodeSite.SendStringList('ERROR INFO', JclDebugHandler1.ExceptionStringList);
For CodeSite 3: If CodeSite.Enabled = True Then
CodeSite.Send('ERROR INFO: ', JclDebugHandler1.ExceptionStringList);
Although it is NOT necessary to check if CodeSite is enabled or not here, I choose to do so because if I disable it and still leave this code in place, an exception will not occur.
About
Contribute to this help topic
This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page