Salesforce

Is it possible to find out which procedure (*.p file) generated an error message?

« Go Back

Information

 
TitleIs it possible to find out which procedure (*.p file) generated an error message?
URL NameP106310
Article Number000140140
EnvironmentProduct: Progress
Version: 9.1D, 9.1E
Product: OpenEdge
Version: 10.x, 11.x
OS: All supported platforms
Question/Problem Description
Is it possible to find out which procedure (*.p file) generated an error message?
How to find out the name of the 4GL procedure that generated an error message?
How to identify the procedure name and line number of the code that generated an error message.
When was the Client Logging startup parameter -clientlog introduced?
How to use the -debugalert and the -clientlog Client Session Logging startup parameters?
 
Steps to Reproduce
Clarifying Information
Main purpose is to find out where the more ambiguous and/or generic error messages occur, such as "** Value too large for integer. (78)"

-debugalert ,-clientlog are client side startup parameters.

Error Message
Defect Number
Enhancement Number
Cause
Resolution
The following assumes traditional error handling.
If structured error handling is used (first introduced in OpenEdge 10.1C), also refer to article  How to log the line number of code that raises an error when using structured error handling.

Starting in 9.1D01, the Client Logging startup parameters(should be setup at Client side) -debugalert and -clientlog were introduced. Using the client session's -debugalert -clientlog  startup parameters output the same DEBUG ALERT 4GL stack trace information; including procedure name and line number; to the specified client log file whenever an error is raised.

-clientlog allows any client session to write to a log file, before it was introduced only AppServer/WebSpeed agents could do that.
Use the SESSION system handle DEBUG-ALERT attribute or the SESSION's -debugalert startup parameter.

In an interactive session, executing the statement:
SESSION:DEBUG-ALERT = TRUE.
results in all alert boxes (for errors and for MESSAGE .. VIEW-AS ALERT-BOX statements) getting a HELP button if an error occurs.  Clicking this HELP button lists the DEBUG ALERT stack trace that identifies the procedure and the line number where the error was generated.

When an error occurs in a session with both -clientlog -debugalert specified, Progress records the 4GL stack trace information along with the error in the specified log file. For AppServer and WebSpeed agents, these go to the <servername>.server.log
Workaround
The PROGRAM-NAME function can be used to extract limited stack information. It will show the program names, but not the exact line numbers.
Notes
References to Written Documentation:

Progress Language Reference: "DEBUG-ALERT Attribute"
Progress Language Reference: "PROGRAM-NAME function"
Progress Debugger Guide: "Using the SESSION Handle with a Debugging Session"
Progress Startup Command and Parameter Reference: "Debug Alert (-debugalert)"
Progress Startup Command and Parameter Reference: "Client Logging (-clientlog)"

Progress Article(s):
 How to log the line number of code that raises an error when using structured error handling
Keyword Phrase
Last Modified Date11/20/2020 7:28 AM

Powered by