From c96665cde3dcb72ac8e2ce1da2f0968691ca11e7 Mon Sep 17 00:00:00 2001 From: Timothy Baldridge Date: Thu, 30 Apr 2020 06:17:18 -0600 Subject: [PATCH] Print the archive being extracted when analysis fails. --- Wabbajack.VirtualFileSystem/VirtualFile.cs | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/Wabbajack.VirtualFileSystem/VirtualFile.cs b/Wabbajack.VirtualFileSystem/VirtualFile.cs index 7e589678..d01dabaa 100644 --- a/Wabbajack.VirtualFileSystem/VirtualFile.cs +++ b/Wabbajack.VirtualFileSystem/VirtualFile.cs @@ -183,13 +183,22 @@ namespace Wabbajack.VirtualFileSystem if (!await extractedFile.CanExtract()) return self; - await using var extracted = await extractedFile.ExtractAll(context.Queue); + try + { - var list = await extracted - .PMap(context.Queue, - file => Analyze(context, self, file.Value, file.Key, depth + 1)); + await using var extracted = await extractedFile.ExtractAll(context.Queue); - self.Children = list.ToImmutableList(); + var list = await extracted + .PMap(context.Queue, + file => Analyze(context, self, file.Value, file.Key, depth + 1)); + + self.Children = list.ToImmutableList(); + } + catch (Exception ex) + { + Utils.Log($"Error while examining the contents of {relPath.FileName}"); + throw; + } return self; }