Skip to content

Commit

Permalink
better error handling when getting file infos
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuki-Codes committed Apr 21, 2021
1 parent a5acf16 commit 89a8cfc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Anamnesis/Files/Sources/LocalFileSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace Anamnesis.Files
using System.Threading.Tasks;
using Anamnesis.Files.Infos;
using Microsoft.VisualBasic.FileIO;

using Serilog;
using Directories = System.IO.Directory;
using Files = System.IO.File;
using Paths = System.IO.Path;
Expand Down Expand Up @@ -108,8 +108,9 @@ public List<File> GetFiles(IFileSource.IDirectory current, bool recursive, FileI
file.Metadata = info.GetMetadata(file);
results.Add(file);
}
catch (Exception)
catch (Exception ex)
{
Log.Error(ex, "Failed to get file information");
}
}
}
Expand Down

0 comments on commit 89a8cfc

Please sign in to comment.