Enable stack tracing with error objects
- Last Updated: June 28, 2023
- 1 minute read
- OpenEdge
- Version 12.2
- Documentation
All error objects have the ability to preserve the call stack in the CallStack property. The property is populated at the time an error
object is instantiated. Populating the CallStack property
incurs a small amount of overhead that you may not want. Therefore, ABL has an attribute on
the SESSION handle called ERROR-STACK-TRACE and a startup parameter called -errorstack to enable or disable this feature. The default value is FALSE (disabled). However, if getting the call stack is important
for troubleshooting your application, you should not hesitate to use it. Note that it is not
necessary to use this to get call stack information from any of the Stop classes (Progress.Lang.StopError, Progress.Lang.Stop, or any of its subclasses). For STOP conditions, CallStack is always
populated.
If ERROR-STACK-TRACE is FALSE, the CallStack property of
an error object is the Unknown value (?).
If ERROR-STACK-TRACE is TRUE, an error object thrown from an application server to a
client contains the stack trace from the application server in its CallStack property. If ERROR-STACK-TRACE is
TRUE on the client, the CallStack property also includes the client stack trace. The text "Server StackTrace:" appears at the top of the application server
stack trace to differentiate it from the client stack trace.
|