Cuemon .NET Framework
Flatten(Exception,Type) Method

The exception to flatten.
The type of the specified exception.
Flattens any inner exceptions descendant-or-self from the specified exception into an IEnumerable sequence of exceptions.
Syntax
'Declaration
 
Public Overloads Shared Function Flatten( _
   ByVal exception As Exception, _
   ByVal exceptionType As Type _
) As IEnumerable(Of Exception)

Parameters

exception
The exception to flatten.
exceptionType
The type of the specified exception.

Return Value

An empty IEnumerable sequence if no inner exceptions was referenced; otherwise any inner exceptions descendant-or-self from the specified exception.
Exceptions
ExceptionDescription
System.ArgumentNullExceptionexception -or exceptionType is null.
Remarks
If any inner exceptions are referenced this method will iterative flatten all of them descendant-or-self from the specified exception.
Should the exception be of the new AggregateException type introduced with .NET 4.0, the return sequence of this method will be equal to the result of the InnerExceptions property.
Requirements

Target Platforms: Windows 8, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

ExceptionUtility Class
ExceptionUtility Members
Overload List

 

 


| Cuemon is licensed under a The MIT License (MIT)



© 2009-2015 Weubphoria. All Rights Reserved.

Documentation made easy with Document! X by Innovasys

Send Feedback