Errorhandling inside DCBROWSECOLs

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
Tom
Posts: 1234
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Errorhandling inside DCBROWSECOLs

#1 Post by Tom »

Hi, Roger.

I found this code in _DCXBROW.PRG:

Code: Select all

METHOD DC_XbpBrowse:forceStable()
LOCAL bErrorBlock := ErrorBlock({|e|_TrapErrors(e)})
BEGIN SEQUENCE
::XbpBrowse:forceStable()
END SEQUENCE
ErrorBlock(bErrorBlock)
RETURN self
This means that the standard error system or the error system of the app is inactive during "ForceStable".

The :ForceStable method is not only called directly (from my code), but implicit several times (in my opinion during browse creation and refresh calls).

Your code (above) leads to the situation that errors inside functions called using the itemmarked-slots, but also code used inside color-codeblocks (!) do not lead to a runtime error. Wrong color-codeblocks create wrong browse layouts (missing cells, missing rows, no navigation), but no errors (I can create a sample if you need one). This makes debugging difficult in those cases. Errors inside itemmarked-codeblocks sometimes call the DC-error system, but not the runtime error system of the app.

Is this something you left inside from earlier days?

Tom
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Errorhandling inside DCBROWSECOLs

#2 Post by rdonnay »

Tom -

I don't remember putting that in there.
I must have had a reason at the time.
I think it had something to do with early releases of SL1.

I agree that this should be removed.
I will do it in the next build.

Thanks for catching that.

Roger
The eXpress train is coming - and it has more cars.

Post Reply