Class OperationFailedException
Thrown whenever an API fails. In case of bulk operation, you even recieve information about existing keys or unavailable space wrapped within this exception.
Namespace:
Assembly: Alachisoft.NCache.Runtime.dll
Syntax
[Serializable]
public class OperationFailedException : CacheException, ISerializable, _Exception
Examples
The following example demonstrates how to use this exception in your code.
try
{
...
}
catch(OperationFailedException ex)
{
...
}
OperationFailedException()
default constructor.
Declaration
public OperationFailedException()
OperationFailedException(SerializationInfo, StreamingContext)
overloaded constructor, manual serialization.
Declaration
protected OperationFailedException(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
System.Runtime.Serialization.SerializationInfo | info | |
System.Runtime.Serialization.StreamingContext | context |
OperationFailedException(String)
overloaded constructor, takes the reason as parameter.
Declaration
public OperationFailedException(string reason)
Parameters
Type | Name | Description |
---|---|---|
System.String | reason |
OperationFailedException(String, Boolean)
overloaded constructor, takes the reason as parameter.
Declaration
public OperationFailedException(string reason, bool isTracable)
Parameters
Type | Name | Description |
---|---|---|
System.String | reason | |
System.Boolean | isTracable |
OperationFailedException(String, Exception)
overloaded constructor.
Declaration
public OperationFailedException(string reason, Exception inner)
Parameters
Type | Name | Description |
---|---|---|
System.String | reason | reason for exception |
System.Exception | inner | nested exception |
OperationFailedException(String, Exception, Boolean)
overloaded constructor.
Declaration
public OperationFailedException(string reason, Exception inner, bool isTracable)
Parameters
Type | Name | Description |
---|---|---|
System.String | reason | reason for exception |
System.Exception | inner | nested exception |
System.Boolean | isTracable |
IsTracable
Declaration
public bool IsTracable { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
GetObjectData(SerializationInfo, StreamingContext)
manual serialization
Declaration
[SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)]
public override void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
System.Runtime.Serialization.SerializationInfo | info | |
System.Runtime.Serialization.StreamingContext | context |