From fda6b311f9dabed4078ae9b0d42963f73d78f277 Mon Sep 17 00:00:00 2001 From: jvyden Date: Mon, 26 Aug 2024 14:04:02 -0400 Subject: [PATCH] Log expected/invalid param sfo header when we have an invalid header --- Refresher/Verification/ParamSfo.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Refresher/Verification/ParamSfo.cs b/Refresher/Verification/ParamSfo.cs index aab1325..368cc76 100644 --- a/Refresher/Verification/ParamSfo.cs +++ b/Refresher/Verification/ParamSfo.cs @@ -28,7 +28,9 @@ public ParamSfo(Stream stream) if (header[i] == headerToMatch[i]) continue; - throw new InvalidDataException("Magic header does not match the expected data from a typical PARAM.SFO file!"); + string headerToMatchStr = Encoding.ASCII.GetString(header); + string headerStr = Encoding.ASCII.GetString(header); + throw new InvalidDataException($"Magic header does not match the expected data from a typical PARAM.SFO file! Expected '{headerToMatchStr}', got '{headerStr}'"); } this.Version = reader.ReadUInt32();