public static int GetIndexOfFirstExceptionThrown <TException>()
 {
     return(ExceptionsThrown.FindIndex(e => e != null && e.GetType() == typeof(TException)));
 }
 public static int GetIndexOfFirstExceptionThrown()
 {
     return(ExceptionsThrown.FindIndex(e => e != null));
 }