Longer ExceptionMessage when Chapter comparison fails

#289
This commit is contained in:
Glax 2024-12-04 19:49:26 +01:00
parent 204fb7614d
commit 553f56ecaf

View File

@ -75,7 +75,11 @@ public readonly struct Chapter : IComparable
_ => chapterNumberFloat.CompareTo(otherChapterNumberFloat) _ => chapterNumberFloat.CompareTo(otherChapterNumberFloat)
}; };
} }
else throw new FormatException($"Value could not be parsed"); else throw new FormatException($"Value could not be parsed.\n" +
$"\tVolumeNumber: '{volumeNumber}' ChapterNumber: '{chapterNumber}'\n" +
$"\tOther-VolumeNumber: '{otherChapter.volumeNumber}' Other-ChapterNumber: '{otherChapter.chapterNumber}'\n" +
$"\t{this}\n" +
$"\t{otherChapter}");
} }
/// <summary> /// <summary>