Browse Source

fix: from C# call error message

Akeit0 6 months ago
parent
commit
99bcf5ef27
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/Lua/Exceptions.cs

+ 1 - 1
src/Lua/Exceptions.cs

@@ -221,7 +221,7 @@ public class LuaRuntimeException : Exception, ILuaTracebackBuildable
 
         if (callerFunction is not LuaClosure callerClosure)
         {
-            return ("function", callerFunction.Name);
+            return ("function", current.Function.Name);
         }
 
         return (LuaDebug.GetFuncName(callerClosure.Proto, pc, out var name) ?? "", name ?? current.Function.Name);