I need to intercept all exceptions that occurred on the server (Delphi/FPC) and log it to a file log.
what I am doing now:
procedure TMyService.doSomething;
begin
try
…
…
except on E:Exception do begin
Log.DumpExceptionCallStack(E));
raise Exception.Create(E.message);
end;
end;
</code.
Now I want to make it (Log.DumpExceptionCallStack(E))
default for all my service and methods. So, I can easily identify my class and exactly line number that exception occurred …
Some available event on service to catch it ??
Thanks,
Willian