Class AggregateException
This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
Namespace:
Assembly: Alachisoft.NCache.Runtime.dll
Syntax
[Serializable]
public class AggregateException : CacheException, ISerializable, _Exception
Examples
The following example demonstrates how to use this exception in your code.
try
{
...
}
catch(AggregateException ex)
{
...
}
AggregateException(ArrayList)
constructor, takes the exceptions that are the cause of the current exception as parameter.
Declaration
public AggregateException(ArrayList exceptions)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.ArrayList | exceptions | The exceptions that are the cause of the current exception |
AggregateException(Exception[])
constructor, takes the exceptions that are the cause of the current exception as parameter.
Declaration
public AggregateException(params Exception[] exceptions)
Parameters
Type | Name | Description |
---|---|---|
System.Exception[] | exceptions | The exceptions that are the cause of the current exception |
AggregateException(SerializationInfo, StreamingContext)
overloaded constructor, manual serialization.
Declaration
protected AggregateException(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
System.Runtime.Serialization.SerializationInfo | info | |
System.Runtime.Serialization.StreamingContext | context |
AggregateException(String, ArrayList)
overloaded constructor, takes the reason as additional parameter.
Declaration
public AggregateException(string reason, ArrayList exceptions)
Parameters
Type | Name | Description |
---|---|---|
System.String | reason | reason for exception |
System.Collections.ArrayList | exceptions | The exceptions that are the cause of the current exception |
InnerExceptions
The exceptions that are the cause of the current exception.
Declaration
public Exception[] InnerExceptions { get; }
Property Value
Type | Description |
---|---|
System.Exception[] |
Message
The message of the exception. This message is the aggregate message from multiple exceptions.
Declaration
public override string Message { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
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 |