Kbase P84367: ERROR-STATUS:ERROR not true when an error was raised
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  5/12/2010 |
|
Status: Unverified
SYMPTOM(s):
ERROR-STATUS:ERROR not true when an error was raised
Function or method invoked with NO-ERROR qualifier
Errors occur but ERROR-STATUS:ERROR attribute not set to TRUE
Error messages shown if same method / function invoked without NO-ERROR
FACT(s) (Environment):
Progress 9.x
OpenEdge 10.x
All Supported Operating Systems
CAUSE:
This is expected behavior.
However, the documentation on ERROR-STATUS:ERROR fails to highlight that this attribute cannot capture all errors on an object reliably and that it is not possible to enumerate the cases where NO-ERROR will fail to set error-status, or where it will fail to suppress error-messages, and likewise for when it does set them from within an expression. These are cases that come up ad-hoc, sometimes from third parties and sometimes from unusual transaction conditions and cannot be documented or even predicted exhaustively.
FIX:
The solution is to use ERROR-STATUS:NUM-MESSAGES as this can be relied to return the correct value. Combined with GET-NUMBER() and GET-MESSAGE(), the programmer can trap the errors that may arise.
The documentation was updated to reflect this n OpenEdge 10.1B or later releases