Show / Hide Table of Contents

Struct ExceptionAggregator

Represents aggregator of multiple exceptions.

Implements
ISupplier<Exception>
IFunctional
Inherited Members
ValueType.Equals(object)
ValueType.GetHashCode()
ValueType.ToString()
object.GetType()
object.Equals(object, object)
object.ReferenceEquals(object, object)
Namespace: DotNext.Runtime.ExceptionServices
Assembly: DotNext.dll
Syntax
public struct ExceptionAggregator : ISupplier<Exception?>, IFunctional

Properties

View Source

IsEmpty

Gets a value indicating that this object has no inner exceptions.

Declaration
public readonly bool IsEmpty { get; }
Property Value
Type Description
bool

Methods

View Source

Add(Exception)

Aggregates exception.

Declaration
public void Add(Exception e)
Parameters
Type Name Description
Exception e

The exception to add.

View Source

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.

View Source

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 Source

operator +=(Exception)

Aggregates exception.

Declaration
public void operator +=(Exception e)
Parameters
Type Name Description
Exception e

The exception to add.

Implements

ISupplier<TResult>
IFunctional

Extension Methods

BasicExtensions.IsBetween<T, TLowerBound, TUpperBound>(T, TLowerBound, TUpperBound)
BasicExtensions.IsOneOf<T>(T, params ReadOnlySpan<T>)
Enumerator.Skip<TEnumerator, T>(ref TEnumerator, int)
  • View Source
☀
☾
In this article
Back to top
Supported by the .NET Foundation
☀
☾