File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
AwsEncryptionSDK/runtimes/net/Generated/AwsEncryptionSdk Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change 11// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
22// SPDX-License-Identifier: Apache-2.0
33// Do not modify this file. This file is machine generated, and any changes to it will be overwritten.
4+
45using System ;
5- using AWS . Cryptography . EncryptionSDK ;
6+ using System . Collections . Generic ;
7+
68namespace AWS . Cryptography . EncryptionSDK
79{
810 public class CollectionOfErrors : Exception
911 {
1012 public readonly System . Collections . Generic . List < Exception > list ;
11- public CollectionOfErrors ( System . Collections . Generic . List < Exception > list , string message ) : base ( message ) { this . list = list ; }
13+ public CollectionOfErrors ( System . Collections . Generic . List < Exception > list , string message ) : base ( message + $ " \n List: \n { ListAsString ( list ) } " ) { this . list = list ; }
1214 public CollectionOfErrors ( string message ) : base ( message ) { this . list = new System . Collections . Generic . List < Exception > ( ) ; }
1315 public CollectionOfErrors ( ) : base ( "CollectionOfErrors" ) { this . list = new System . Collections . Generic . List < Exception > ( ) ; }
16+
17+ private static string ListAsString ( List < Exception > list )
18+ {
19+ if ( list . Count < 1 ) return "" ;
20+ string [ ] msgArr = new string [ list . Count ] ;
21+ for ( int i = 0 ; i < list . Count ; i ++ )
22+ msgArr [ i ] = $ "{ list [ i ] . GetType ( ) . Name } :: { list [ i ] . Message } ";
23+ return String . Join ( "\n \t " , msgArr ) ;
24+ }
1425 }
1526
1627}
You can’t perform that action at this time.
0 commit comments