Show / Hide Table of Contents

Class ExceptionAggregator

Catches exceptions of operations and aggregates them in a list.

Inheritance
object
ExceptionAggregator
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Microsoft.XboxStudios.ClientManager
Assembly: ClientManager.dll
Syntax
public static class ExceptionAggregator

Methods

View Source

ExecuteAndCatchException(Action, ICollection<Exception>?)

Executes an action, catches any excpetion and adds it to the provided lists of exceptions.

Declaration
public static ICollection<Exception>? ExecuteAndCatchException(Action action, ICollection<Exception>? exceptions)
Parameters
Type Name Description
Action action

The action to execute.

ICollection<Exception> exceptions

The list of exceptions.

Returns
Type Description
ICollection<Exception>

The list of exceptions. The provided list is returned if no exception is thrown.

View Source

ExecuteAndCatchExceptionAsync(Func<Task>, ICollection<Exception>?)

Executes an asynchronous operations, catches an exception and adds it to the provided list of exceptions.

Declaration
public static Task<ICollection<Exception>?> ExecuteAndCatchExceptionAsync(Func<Task> func, ICollection<Exception>? exceptions)
Parameters
Type Name Description
Func<Task> func

The async operation to execute.

ICollection<Exception> exceptions

The list of exception.

Returns
Type Description
Task<ICollection<Exception>>

The list of exceptions. The provided list is returned if no exception is thrown.

  • View Source
In this article
Back to top Generated by DocFX