I am using Delphi XE2 and Mad Except i have an application witch uses Indy for some internet operations ... the problem is that when an simple exception is raised like there is no internet connection madexcept pops up. I want to disable these exceptions witch are coming from indy.
I have the following exception class : EIdSocketError message : Socket Error #11004
I entered in the exception filter dialog in mad except and put EIdSocketError at exception filter but it doesn't work what am i doing wrong ?
The name of the class being raised is
EIdSocketError
but you set the filter toEIDSocketError
instead. Perhaps MadExcept is case sensitive? Also keep in mind that all Indy exceptions are ultimately derived fromEIdException
so you might want to filter for that instead.In any case, MadExcept only catches uncaught exceptions, so using
try/except
blocks in your code is the correct solution. That is how Indy is designed to be used. If you are getting exceptions when the components are being instantiated at runtime during DFM streaming, then you must have left the components in an Active state at design-time. Do not do that. Make sure the components are deactivated at designtime, then activate them in your code at runtime when you are ready to use them.