PDA

View Full Version : Save Exceptions to DataBase


Daniel
06-Jul-2005, 09:02 PM
Hi!!

I'm testing EurekaLog 5.0.2 Trial and I was wondering if I can save exceptions into DataBase. I'm sure I can. I wrote the following code:

procedure TForm1.EurekaLog1ExceptionNotify(
EurekaER: TEurekaExceptionRecord; var Handled: Boolean);
var ...
begin
...
ConnectionDB1.Insert_Exceptions_Method(
Exception(EurekaER.ExceptionObject).ClassType.Clas sName,...);
...
end;

EveryThing works well, but if I intentionally shutdown my data base server
and I raise some Exception to test, EurekaLog should (I think) write the raised exception by Insert_Exceptions_Method but It don't. Even any Exception raises therefore I won't know if I have problems with the DataBase Connection.

Is there any solution to this?

P.D: I don't speak English very well. I'm sorry.

admin
10-Jul-2005, 09:00 AM
I suggest to you to test the Server connection before to use the Insert command so to avoid any closed-connection errors.

If the connections is down the EurekaLog will save their data in its log file.

You can check for the EurekaLog log file after (at next exception or at the program closing) and insert any new exceptions in your database.

I hope to have answered to your question! :)