Class CollectionTypeMismatchException
Thrown whenever an API fails. In case of GetCollection with invalid Type, if created collection on cache store is of differente type, then it throws this type of exception,
Assembly: Alachisoft.NCache.Runtime.dll
Syntax
public class CollectionTypeMismatchException : CacheException
Examples
The following example demonstrates how to use this exception in your code.
try
{
IDistributedList <int> distributedList = cache.Collections.CreateList <int>("key");
IDistributedQueue <int> distributedQueue = cache.Collections.GetQueue <int> ("key");
}
catch(CollectionTypeMismatch ex)
{
...
}
Constructors
Name | Description |
---|---|
CollectionTypeMismatchException() | Default constructor of class CollectionTypeMismatchException. |
CollectionTypeMismatchException(SerializationInfo, StreamingContext) | overloaded constructor, manual serialization. |
CollectionTypeMismatchException(Int32, String) | overloaded constructor |
CollectionTypeMismatchException(Int32, String, Boolean) | overloaded constructor |
CollectionTypeMismatchException(Int32, String, Exception) | overloaded constructor |
CollectionTypeMismatchException(Int32, String, Exception, Boolean) | overloaded constructor |
CollectionTypeMismatchException(Int32, String, String) | overloaded constructor |
CollectionTypeMismatchException(String) | Overloaded constructor, takes the reason as parameter. |
CollectionTypeMismatchException(String, Boolean) | Overloaded constructor, takes the reason as parameter. |
CollectionTypeMismatchException(String, Exception) | Overloaded constructor. |
CollectionTypeMismatchException(String, Exception, Boolean) | overloaded constructor. |
Properties
Name | Description |
---|---|
IsTracable | Specifies whether the exception is to be logged or not |
Methods
Name | Description |
---|---|
GetObjectData(SerializationInfo, StreamingContext) | manual serialization |