Class CacheException
It is the base class for all the exceptions that are thrown from NCache. So you can catch this exception for all the exceptions thrown from within the NCache.
Inheritance
System.Object
CacheException
Namespace:
Assembly: Alachisoft.NCache.Runtime.dll
Syntax
public class CacheException : Exception
Examples
The following example demonstrates how to use this exception in your code.
try
{
...
}
catch(CacheException ex)
{
...
}
Constructors
CacheException()
default constructor.
Declaration
public CacheException()
CacheException(SerializationInfo, StreamingContext)
overloaded constructor, manual serialization.
Declaration
protected CacheException(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
SerializationInfo | info | |
StreamingContext | context |
CacheException(String)
overloaded constructor, takes the reason as parameter.
Declaration
public CacheException(string reason)
Parameters
Type | Name | Description |
---|---|---|
System.String | reason |
CacheException(String, Exception)
overloaded constructor.
Declaration
public CacheException(string reason, Exception inner)
Parameters
Type | Name | Description |
---|---|---|
System.String | reason | reason for exception |
Exception | inner | nested exception |
Methods
GetObjectData(SerializationInfo, StreamingContext)
manual serialization
Declaration
public override void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
SerializationInfo | info | |
StreamingContext | context |