diff --git a/CHANGELOG.md b/CHANGELOG.md index 008b2789..6011248c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ * Basic support for commandline options in the WPF app * Re-add support for file associations of Wabbajack and .wabbajack files (thanks erri!) * Update to the latest game finder libraries +* Add some debugging messages for when zEdit merge fails #### Version - 3.0.1.9 - 10/4/2022 * Lots of compiler improvements for faster compilation diff --git a/Wabbajack.Installer/StandardInstaller.cs b/Wabbajack.Installer/StandardInstaller.cs index 30c5ffc0..e6a9d7cc 100644 --- a/Wabbajack.Installer/StandardInstaller.cs +++ b/Wabbajack.Installer/StandardInstaller.cs @@ -479,7 +479,22 @@ public class StandardInstaller : AInstaller await using var fs = _configuration.Install.Combine(m.To) .Open(FileMode.Create, FileAccess.ReadWrite, FileShare.None); - await BinaryPatching.ApplyPatch(new MemoryStream(srcData), new MemoryStream(patchData), fs); + try + { + await BinaryPatching.ApplyPatch(new MemoryStream(srcData), new MemoryStream(patchData), fs); + } + catch (Exception ex) + { + _logger.LogError(ex, "While creating zEdit merge, entering debugging mode"); + foreach (var source in m.Sources) + { + var hash = await _configuration.Install.Combine(source.RelativePath).Hash(); + _logger.LogInformation("For {Source} expected hash {Expected} got {Got}", source.RelativePath, source.Hash, hash); + } + + throw; + } + return m; }).ToList(); }