Link to home
Start Free TrialLog in
Avatar of EricTaylor
EricTaylor

asked on

assigning an exception handler in a library

I have written an exception handler that needs to be used by multiple programs, so I put it in a bpl.  However, when I try to assign the exception handler in the program like this:
Application.OnException := MyLibrary.ExceptHandler;

Open in new window

I get "Incompatible types: 'method pointer and regular procedure'". I understand that method pointers and regular procedures are different, but I don't know how to declare the exception handler in the library so it's a method pointer. I tried putting it in a class in the library, but this didn't make a difference.
Thanks in advance for your help.
ASKER CERTIFIED SOLUTION
Avatar of Sinisa Vuk
Sinisa Vuk
Flag of Croatia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of EricTaylor
EricTaylor

ASKER

Thanks. That did it. (I tried creating the c lass previously, but forgot to create the var part so I could access it. Your example helped.)