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,
Inherited Members
Assembly: Alachisoft.NCache.Runtime.dll
Syntax
[Serializable]
public class CollectionTypeMismatchException : CacheException, ISerializable, _Exception, ICompactSerializable
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(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(SerializationInfo, StreamingContext) | overloaded constructor, manual serialization. |
| 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 |