From 466d9008a021dddda366f8fb4e5323b866f6d73b Mon Sep 17 00:00:00 2001 From: Chris Bessent Date: Tue, 14 Dec 2021 12:41:57 -0700 Subject: [PATCH] Catch and log errors when extracting BSAs --- .../FileExtractor2/FileExtractor.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Wabbajack.VirtualFileSystem/FileExtractor2/FileExtractor.cs b/Wabbajack.VirtualFileSystem/FileExtractor2/FileExtractor.cs index 7bdcff92..92951e3e 100644 --- a/Wabbajack.VirtualFileSystem/FileExtractor2/FileExtractor.cs +++ b/Wabbajack.VirtualFileSystem/FileExtractor2/FileExtractor.cs @@ -155,8 +155,15 @@ namespace Wabbajack.VirtualFileSystem if (!shouldExtract(entry.Path)) continue; - var result = await mapfn(entry.Path, new ExtractedMemoryFile(await entry.GetStreamFactory())); - results.Add(entry.Path, result); + try + { + var result = await mapfn(entry.Path, new ExtractedMemoryFile(await entry.GetStreamFactory())); + results.Add(entry.Path, result); + } + catch (Exception e) + { + Utils.Error($"Failed to extract '{entry.Path}' from '{sFn.Name}'"); + } } return results;