System.SysUtils.Exception.StackTrace
Delphi
property StackTrace: string read GetStackTrace;
C++
__property System::UnicodeString StackTrace = {read=GetStackTrace};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
property | public | System.SysUtils.pas System.SysUtils.hpp |
System.SysUtils | Exception |
Description
String representation of the stack information.
By default, StackTrace is always an empty string. If you want StackTrace to contain an actual value, you must assign GetStackInfoStringProc a procedure that can generate a string from the stack information.
Using Exception.StackTrace
In order to use the StackTrace property to obtain the stack trace for exceptions, you have to use (or implement) a stack trace provider. There are a number of third-party solutions, both commercial and free.
Some of the stack trace providers are:
- JEDI Code Library (the JclDebug and the JCLHoohExcept unit).
- EurekaLog
- madExcept
For more information on how to use some of the above third-party stack trace providers, see the following blog posts:
- Working with Delphi’s new Exception.StackTrace (Tobias Gurock, 2009).
- CodeVerge - How to use Exception.StackTrace (2008).