delphieurekalog

Assert raise no Exception


This is a small method to test exceptions in Delphi. Currently I use JCL to generate callstack.

procedure TClientMainCommonForm.Button2Click(Sender: TObject);
begin
  Assert(False);
end;

Now I evaluate EurekaLog. For hardware exceptions it works great. It calls my event OnExceptionNotify. But it don't works for Assert. Yes I have checked Assertions checkbox in Project options. When I debug it the debugger show the assertions. But OnExceptionNotify is not called. What have I missed ?

EDIT: Tried now to make a new VCL application with Delphi 11.3. Everything including Assert works as expected. But not my big application. I tried to import the eof-file from my new app to real app without result. I am not sure how to continue


Solution

  • I understand the reason now. EurekaLog add a hook to Application.ShowException.

    So that must be called to trigger Eurekalog exceptionhandling. I had logic that didn't do that for software exceptions like Assert.