RegisterExceptionHandler problem

delphi package - automated exception handling
Post Reply
costa
Posts: 2
Joined: Fri Jan 14, 2005 3:17 am

RegisterExceptionHandler problem

Post by costa »

I am having a small problem. When I write:

Code: Select all

interface
uses windows,sysutils;

implementation

uses madExcept,idexception;

procedure ExceptionFilter(frozen          : boolean;
                          exceptObject    : TObject;
                          exceptAddr      : pointer;
                          crashedThreadId : dword;
                          var bugReport   : string;
                          var screenShot  : string;
                          var canContinue : boolean;
                          var handled     : boolean);
begin
  if (exceptObject <> nil) and (exceptObject is EIdSilentException) then begin
    handled := true;
  end;
end;
initialization
  RegisterExceptionHandler(ExceptionFilter,false);

I get the following:

[Error] exceptionfilterunit.pas(26): There is no overloaded version of 'RegisterExceptionHandler' that can be called with these arguments

Any ideas? I am using 2.7e
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

2nd parameter of RegisterExceptionHandler needs to be "stDontSync" instead of "false".
costa
Posts: 2
Joined: Fri Jan 14, 2005 3:17 am

Post by costa »

Great thank you! :)
Post Reply