Project

General

Profile

Bug #5761

replace ErrorManager.displayError with recordOrThrowError and fix recordOrShowError to morph into a recordOrThrowError in certain cases.

Added by Constantin Asofiei over 2 years ago. Updated over 1 year ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
Due date:
% Done:

0%

billable:
No
vendor_id:
GCD
case_num:

Related issues

Related to Base Language - Feature #4373: finish core OO 4GL support New
Related to Base Language - Feature #4352: finish progress.lang.apperror and progress.lang.syserror Rejected
Related to Database - Bug #6919: fix ErrorManager.displayError in TempTableBuilder Review

History

#2 Updated by Constantin Asofiei over 2 years ago

From #5070-16:

The NPE is because of a create-like("") call on a temp-table handle. I need to debug OE and find if the temp-table name is really empty at that step... as after fixing the NPE I get error dialogs displayed, but the report completes.

The main problem is that ErrorManager.displayError is used a lot from p2j.persist and p2j.util packages.

From what I tested in this specific create-like("") case, the recordOrShowError should have been used. But, in OE if block-level on error undo, throw., an SysError is raised - and in FWD, recordOrShowError does not do this.

So I need to fix/check two things:
  • if recordOrShowError must be used instead of displayError (at least in p2j.persist APIs related to handle methods/attributes)
  • fix recordOrShowError to throw a SysError if block-level on error undo, throw. is set.
From other testing, in the following circumstances this will set ERROR-STATUS:ERROR to true or raise a legacy OE error (if NO-ERROR is not set):
  • block-level on error undo, throw. is set
  • ON ERROR UNDO, THROW is at the block
  • a catch block for progress.lang.syserror exists at the block

For the last two, we need to check if the catch or ON clause is required to be at the parent block or anywhere on the stacktrace. The idea is that in these cases, OE raises a progress.lang.syserror.

Also, in FWD ErrorManager.displayError is used in a lot of places. I found that for some of them, like usage in p2j.persist temp-table related classes, was incorrectly determined that the error is displayed and not logged if NO-ERROR is used. Although I think there are legitimate cases where displayError must be used, we need to review all usages of this in FWD, and see which are the legitimate ones.

#3 Updated by Greg Shah over 2 years ago

#4 Updated by Greg Shah over 2 years ago

  • Related to Feature #4352: finish progress.lang.apperror and progress.lang.syserror added

#6 Updated by Constantin Asofiei over 1 year ago

  • Related to Bug #6919: fix ErrorManager.displayError in TempTableBuilder added

#7 Updated by Constantin Asofiei over 1 year ago

Added #6919 for the TempTableBuilder/AbstractTempTable cases.

Also available in: Atom PDF