I have a DLL written in Delphi 7, which SQL Server calls to run some functions. I enabled MadExcept to handle exceptions, together with the option to log exceptions.
However, I can't seem to get MadExcept to work correctly. If I raise an error manually in the DLL e.g.
raise EOutOfMemory.Create('Test');
MadExcept does not catch the exception. Instead, SQL Server catches the exception and reports it.
I'm using 2.7g. Should I use version 3 instead? We're currently sticking to 2.7g as it's working for our regular exes'. Thanks.
Mike
2.7g in DLL
Pleaes check out the first paragraph on this page:
http://help.madshi.net/HowToUseMadExcept.htm
The problem is quite simple: Exceptions are generally passed back to the next try..except frame. If the thread jumps into your dll and crashes there, and if in the callstack there's no try..except block inside of your dll, the SQL server will take care of the exception. So you have to add a try..except block to all code that can be called from outside.
http://help.madshi.net/HowToUseMadExcept.htm
The problem is quite simple: Exceptions are generally passed back to the next try..except frame. If the thread jumps into your dll and crashes there, and if in the callstack there's no try..except block inside of your dll, the SQL server will take care of the exception. So you have to add a try..except block to all code that can be called from outside.
-
- Posts: 2
- Joined: Wed Mar 22, 2006 3:34 pm