When use TMyConnection.OnError?
Posted: Fri 06 Nov 2015 18:59
I'm using TMyConnection and TMyScript to communicate with a MySQL
server. For TMyScript, I do
in the TMyScript.OnError event. I then do
and log the errors. I've looked at the docs (and the source), but I'm
not sure if I should be using a TMyConnection.OnError event. The docs
say that setting Fail to false will prevent a dialog and raise EAbort.
I would like to prevent any dialogs; I want to catch the exceptions
and log them. Should I set Fail to false? If so, do I need to catch
errors other than EDAError?
MyDAC Professional 8.6.19, Delphi 10 Seattle.
server. For TMyScript, I do
Code: Select all
Action := eaFail;Code: Select all
try
...
except
on E: EDAError do
...
end;not sure if I should be using a TMyConnection.OnError event. The docs
say that setting Fail to false will prevent a dialog and raise EAbort.
I would like to prevent any dialogs; I want to catch the exceptions
and log them. Should I set Fail to false? If so, do I need to catch
errors other than EDAError?
MyDAC Professional 8.6.19, Delphi 10 Seattle.