Kbase P126772: CAN-FIND does not return runtime errors
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  11/6/2007 |
|
Status: Unverified
FACT(s) (Environment):
All Supported Operating Systems
Progress/OpenEdge Versions
SYMPTOM(s):
CAN-FIND does not return runtime errors
No error returned in CAN-FIND when buffer not available
** <file-name> record not on file. (138)
** No <file-name> record is available. (91)
CAN-FIND not reporting unavailable buffer
CAUSE:
The CAN-FIND function was designed to be used in-line in conditional logic and, as such, does not return runtime errors that might be incurred due to references in its predicate. For instance, when referring to a field in an unavailable buffer anywhere in code you'd expect to see the error 91 stating that no record is available. When doing the same within the predicate of a CAN-FIND such errors are intentionally suppressed.
CAN-FIND should only ever return a TRUE/FALSE value depending upon the outcome of the query and developers are responsible for ensuring that buffers used in the CAN-FIND's query predicate are available and contain expected values.
Prior to Progress Version 8.x this was not the case because of a bug which caused these errors to be returned.
Note: This behavior only pertains to runtime errors that occur in the scope of CAN-FIND usage. Any compile-time errors or unhandled exceptions should still be seen.