Skip to content

Commit

Permalink
Improve error dialog when DiscMountJob fails
Browse files Browse the repository at this point in the history
  • Loading branch information
YoshiRulz authored Apr 15, 2024
1 parent c35aeb9 commit 8f963ba
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/BizHawk.Emulation.DiscSystem/DiscExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ private static Disc CreateImpl(DiscType? type, string path, Action<string> error

if (discMountJob.OUT_ErrorLevel)
{
throw new InvalidOperationException($"\r\n{discMountJob.OUT_Log}");
throw new Exception(string.IsNullOrEmpty(discMountJob.OUT_Log)
? $"Could not process file \"{path}\"."
: $"Could not process file \"{path}\". Warnings/errors:\n{discMountJob.OUT_Log}\n(end disc load log)");
}

var disc = discMountJob.OUT_Disc;
Expand Down

0 comments on commit 8f963ba

Please sign in to comment.