public Content[] GetFeed2(string feedPath, bool onlyFiles, bool onlyFolders, int start, int limit)
{
var exceptions = new List<Exception>();
while (exceptions.Count < 3)
{
try
{
var contents = GetFeed2Private(feedPath, onlyFiles, onlyFolders, start, limit);
//System.Diagnostics.Debug.WriteLine("========================================");
//System.Diagnostics.Debug.WriteLine("Exceptions: " + exceptions.Count);
//foreach(var exc in exceptions)
// System.Diagnostics.Debug.WriteLine("Exception: " + exc.Message);
//System.Diagnostics.Debug.WriteLine("========================================");
return contents;
}
catch(Exception e) //TODO: catch block
{
exceptions.Add(e);
}
}
//System.Diagnostics.Debug.WriteLine("========================================");
//System.Diagnostics.Debug.WriteLine("Exceptions: " + exceptions.Count);
//foreach (var exc in exceptions)
// System.Diagnostics.Debug.WriteLine("Exception: " + exc.Message);
//System.Diagnostics.Debug.WriteLine("THROW");
//System.Diagnostics.Debug.WriteLine("========================================");
throw exceptions.Last();
}