Reputation:
I have a http server application and I'm using TIdHTTPServer.
The problem I'm facing is that whenever a client is making a request(via a web browser) and the client refreshes/closes the page before the entire data is sent, the connection is aborted, now the server raises an exception, is there a way to catch and log this and also stop the exception message from showing?
Thank you for your time!
Upvotes: 1
Views: 707
Reputation: 850
The exception that is thrown will only display a message box whilst running in the IDE.
The TIdHTTPServer will catch the exception itself and handle it. It doesn't cause a problem. If you feel the need, you can log these exceptions use the IdHTTPServer.OnException event, otherwise they're essentially discarded.
Upvotes: 4