From 65fb6dcb874c7402792a47c3f3f3625abbc9033b Mon Sep 17 00:00:00 2001 From: "H. Utku Maden" Date: Fri, 28 Jul 2023 22:38:55 +0300 Subject: [PATCH] Add file and lineno to exception msg. --- Quik.StbTrueType/Stbtt.Manual.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Quik.StbTrueType/Stbtt.Manual.cs b/Quik.StbTrueType/Stbtt.Manual.cs index a0862e8..0232a01 100644 --- a/Quik.StbTrueType/Stbtt.Manual.cs +++ b/Quik.StbTrueType/Stbtt.Manual.cs @@ -52,7 +52,8 @@ namespace Quik.Stb string f = file == null ? string.Empty : Marshal.PtrToStringUTF8((IntPtr)file); string func = function == null ? string.Empty : Marshal.PtrToStringUTF8((IntPtr)function); - Exception ex = new Exception("Assert failed in native stbtt code."); + Exception ex = + new Exception($"Assert failed in native stbtt code. ({System.IO.Path.GetFileName(f)}:{line})"); ex.Data.Add("Expression", expr); ex.Data.Add("File", f); ex.Data.Add("Line", line);