Class ConnectionException
This exception is thrown whenever the connection with cache server is lost while performing an operation on an outproc cache.
Inherited Members
Namespace:
Assembly: Alachisoft.NCache.Runtime.dll
Syntax
public class ConnectionException : OperationFailedException
Examples
The following example demonstrates how to use this exception in your code.
try
{
Cache cache = NCache.InitializeCache("sampleCache");
cache.Add("TestKey","sampleData");
}
catch(ConnectionException ex)
{
}
Constructors
Name | Description |
---|---|
ConnectionException() | Default constructor. |
ConnectionException(SerializationInfo, StreamingContext) | Overloaded constructor, manual serialization. |
ConnectionException(Int32) | Overloaded constructor |
ConnectionException(Int32, Net.IPAddress, Int32) | Overloaded constructor |
ConnectionException(Int32, String) | Overloaded constructor |
ConnectionException(Int32, String, Net.IPAddress, Int32) | Overloaded constructor |
ConnectionException(Int32, String, String) | Overloaded constructor |
ConnectionException(Net.IPAddress, Int32) | Overloaded constructor, takes the ipAddress and port as parameter. |
ConnectionException(String) | Overloaded constructor, takes the reason as parameter. |
ConnectionException(String, Net.IPAddress, Int32) | Overloaded constructor, takes the reason, ipAddress and port as parameter. |
Properties
Name | Description |
---|---|
IPAddress | IPAddress of broken connection |
Port | Port of broken connection |