Class ConnectionException
This exception is thrown whenever the connection with cache server is lost while performing an operation on an outproc cache.
Inheritance
System.Object
System.Exception
ConnectionException
Inherited Members
Namespace:
Assembly: Alachisoft.NCache.Runtime.dll
Syntax
[Serializable]
public class ConnectionException : OperationFailedException, ISerializable
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(Int32) | Overloaded constructor |
ConnectionException(Int32, IPAddress, Int32) | Overloaded constructor |
ConnectionException(Int32, String) | Overloaded constructor |
ConnectionException(Int32, String, IPAddress, Int32) | Overloaded constructor |
ConnectionException(Int32, String, String) | Overloaded constructor |
ConnectionException(IPAddress, Int32) | Overloaded constructor, takes the ipAddress and port as parameter. |
ConnectionException(SerializationInfo, StreamingContext) | Overloaded constructor, manual serialization. |
ConnectionException(String) | Overloaded constructor, takes the reason as parameter. |
ConnectionException(String, 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 |