raise TObject - RegisterHiddenExceptionHandler

delphi package - automated exception handling
Post Reply
Heiko
Posts: 4
Joined: Wed Feb 23, 2022 8:11 pm

raise TObject - RegisterHiddenExceptionHandler

Post by Heiko »

Hi,

i have an Problem with the old Outline Control with MadExcept.
We want to activate the HiddenExceptions for all Exceptions in our software.
In the old Outline there will be raised an OutlineError but the base class is TObject, not Exception.
MadExcept throws an AccessViolation.

Is there a nice way to fix it?
Is it possible for MadExcept to check the raised object for Exception base class?
Otherwise I have to fix it in the outline control.

thanks in advance
Heiko
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Re: raise TObject - RegisterHiddenExceptionHandler

Post by madshi »

Strange stuff. Is the Outline Control part of the VCL? Or is it a 3rd party control?
Heiko
Posts: 4
Joined: Wed Feb 23, 2022 8:11 pm

Re: raise TObject - RegisterHiddenExceptionHandler

Post by Heiko »

Yes, the outline is a part of the vcl.

Very strange, the exception happens when the try except block ends.
And the raised "Exception" will ignored by the IDE and the Debugger, that's the trick.
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Re: raise TObject - RegisterHiddenExceptionHandler

Post by madshi »

I've no experience with the outline control. Can you upload a very simple and small test project?
Heiko
Posts: 4
Joined: Wed Feb 23, 2022 8:11 pm

Re: raise TObject - RegisterHiddenExceptionHandler

Post by Heiko »

here is a little demo. I copied the construction of the outline speciality in the demo.
When you press "Nicht abgefangen Exception" the EAccessViolation happens.
Attachments
Hidden.zip
(17.99 KiB) Not downloaded yet
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Re: raise TObject - RegisterHiddenExceptionHandler

Post by madshi »

Works for me. Which madExcept version and which Delphi version did you test this with? I've tried XE8 and the latest official madExcept build.
Heiko
Posts: 4
Joined: Wed Feb 23, 2022 8:11 pm

Re: raise TObject - RegisterHiddenExceptionHandler

Post by Heiko »

we use Delphi 2007 and the last Version of MadExcept 4.0.21.
I have tested with Delphi 11 and MadExcept 5.0 and it works also for me.
thanks for your time.
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Re: raise TObject - RegisterHiddenExceptionHandler

Post by madshi »

I assume it's probably something I fixed in madExcept 5, either intentionally or accidently... :lol:
Post Reply