Add file and lineno to exception msg.

This commit is contained in:
H. Utku Maden 2023-07-28 22:38:55 +03:00
parent d65bb8ad0a
commit 65fb6dcb87
Signed by: themixedupstuff
GPG Key ID: 25A001B636F17843

@ -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);