Click or drag to resize

ExtensionMethodsIsCommunicationException Method

Will iterate through the exception and determine whether the exception was caused by a communication/network issue

Namespace: SanteDB.Core.Http
Assembly: SanteDB.Core.Api (in SanteDB.Core.Api.dll) Version: 3.0.2081-alpha+b4ae72647f2cc271f89142f76fff26ad69e00f5a
Syntax
public static bool IsCommunicationException(
	this Exception exception
)

Parameters

exception  Exception

[Missing <param name="exception"/> documentation for "M:SanteDB.Core.Http.ExtensionMethods.IsCommunicationException(System.Exception)"]

Return Value

Boolean
True if the exception was caused by a communication exception

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Exception. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Remarks
We need to know if an exception was a business/application error (i.e. the message was sent to the server and the server rejected it) to place it into the dead-letter queue. However, if the exception is merely an indication of a communication exception (timeout due to slow send, proxy error, etc.) then we don't want to pollute the outbound queue, rather we want to keep it - pause for a period of time - and retry
See Also