Struct ExceptionAggregator
Represents aggregator of multiple exceptions.
Inherited Members
Namespace: DotNext.Runtime.ExceptionServices
Assembly: DotNext.dll
Syntax
public struct ExceptionAggregator : ISupplier<Exception?>, IFunctional
Properties
View SourceIsEmpty
Gets a value indicating that this object has no inner exceptions.
Declaration
public readonly bool IsEmpty { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Methods
View SourceAdd(Exception)
Aggregates exception.
Declaration
public void Add(Exception e)
Parameters
| Type | Name | Description |
|---|---|---|
| Exception | e | The exception to add. |
CreateException()
Creates aggregated exception.
Declaration
public readonly Exception? CreateException()
Returns
| Type | Description |
|---|---|
| Exception | The aggregated exception; or null if this object has no aggregated exceptions. |
ThrowIfNeeded()
Throws aggregated exception if this object contains at least one exception.
Declaration
public readonly void ThrowIfNeeded()
Exceptions
| Type | Condition |
|---|---|
| AggregateException | This object contains two or more aggregated exceptions. |
| Exception | This object contains single exception. |
Operators
View Sourceoperator +=(Exception)
Aggregates exception.
Declaration
public void operator +=(Exception e)
Parameters
| Type | Name | Description |
|---|---|---|
| Exception | e | The exception to add. |