views:

11

answers:

0

Has anyone got a framework that can be used to determine whether specific communication exceptions are connection or timeout errors?

I have some central Head-Office systems that communicate with various other systems, some SOAP, some WCF and some TCP Sockets. These all create financial transactions.

For each of the above cases I need code to determine whether something was a connection error (so that I can retry the call) or a timeout error (so that I can send a cancellation transaction through because I know do not know whether the transaction succeeded or not)

I have written something like that in the past based on error message and exception class matching, but it was always a hack job to keep the correct exception classes and error messages in sync with any new error message that may pop up because of network updates or OS patches.

Any help would be much appreciated