Try OpenEdge Now
skip to main content
ABL Reference
Class Properties and Methods Reference : CallStack property
 

CallStack property

Contains the ABL procedure call stack indicating where an ABL error or stop object was thrown.
Data type: CHARACTER
Access: PUBLIC Read-only
Applies to: Progress.Lang.ProError class, Progress.Lang.Stop class, System.Exception class (OpenEdge-enhanced)
Returns the contents of the call stack as a string when an ABL error or stop object or a .NET Exception object is thrown. If the error or stop occurs from the user interface, the procedure containing the latest WAIT-FOR statement will be at the top of the call stack.
Note: The StackTrace property of a .NET exception object also provides a stack trace from the implementation of the .NET object being called (that is, the stack of managed routine names and offsets).
For an error only, if the ERROR-STACK-TRACE attribute of the SESSION handle is set to FALSE, this property returns the Unknown value (?). To enable the CallStack property, set the SESSION:ERROR-STACK-TRACE attribute to TRUE, or use the -errorstack startup parameter at session startup.
For a stop, the value of ERROR-STACK-TRACE is irrelevant and CallStack always returns content from the procedure call stack.
Caution: The ERROR-STACK-TRACE is set to FALSE by default because maintaining a call stack for error handling requires overhead that is not warranted in a production environment.
For more information, see ERROR-STACK-TRACE attribute reference entry. For more information on -errorstack, see OpenEdge Deployment: Startup Command and Parameter Reference.
The call stack contains one entry for each item on the stack, starting with the last item, which is where the error or stop occurred. Each entry is delimited by the newline character. Each entry contains three values, separated by whitespace:
*Main block (.p), internal procedure, user-defined function, or method name
*Complete path of the file containing the user-defined function, internal procedure, or name of the method or property body
*Line number at which the error or stop occurred
In addition, if part of the call stack is from an OpenEdge application server's stack trace, "Server StackTrace:" appears above the server portion of the stack.
The following summarizes the syntax for a call stack entry, depending on the source.

Syntax

For a main block (.p):
file-name at line line-number (full-file-name)
For an internal procedure:
internal-procedure-name file-name at line line-number (full-file-name)
For a user-defined function:
user-defined-function-name file-name at line line-number (full-file-name)
For a class property or method:
property-or-method-name class-name at line line-number (full-file-name)
file-name
The name of the .p or .w file as it appears in the RUN statement which invoked the file.
line-number
The line number in the source code file where the error or stop was raised.
full-file-name
The full-file-name is identical to the file-name, but is prepended by the PROPATH element used by the RUN statement or class member invocation to identify the file.
internal-procedure-name
The name of an internal procedure in a .p or .w file.
user-defined-function-name
The name of a user-defined function in a .p or .w file.
property-or-method-name
The name of a property or method whose logic was invoked on class-name.
class-name
The name of the class, including the package name.

Notes

*Stop object support is available as a Technology Preview only in OpenEdge Release 11.7.

See also

ERROR-STACK-TRACE attribute, Progress.Lang.Error interface Progress.Lang.LockConflict class, Progress.Lang.StopAfter class, Progress.Lang.StopError class, Progress.Lang.UserInterrupt class