Repository :
https://github.com/FarGroup/FarManager
On branch : master
Link :
https://github.com/FarGroup/FarManager/commit/5e01b10b9aa37ebf928127497224aaddbd152cf1
>---------------------------------------------------------------
commit 5e01b10b9aa37ebf928127497224aaddbd152cf1
Author: Alex Alabuzhev <
alab...@gmail.com>
Date: Mon Nov 10 18:15:20 2025 +0000
Propagate macro:test errors to logs
>---------------------------------------------------------------
5e01b10b9aa37ebf928127497224aaddbd152cf1
plugins/luamacro/luamacro.lua | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/plugins/luamacro/luamacro.lua b/plugins/luamacro/luamacro.lua
index 7fbd395d5..5564aae43 100644
--- a/plugins/luamacro/luamacro.lua
+++ b/plugins/luamacro/luamacro.lua
@@ -383,6 +383,7 @@ local function Open_CommandLine (strCmdLine)
About()
elseif cmd == "test" then
far.MacroPost( [[
+ local function errorhandler(err) win.OutputDebugString(debug.traceback(err)) end
local function Quit(n) actl.Quit(n) Keys("Esc") end
local OK, R
R = win.JoinPath(far.PluginStartupInfo().ModuleDir, "macrotest.lua")
@@ -390,7 +391,7 @@ local function Open_CommandLine (strCmdLine)
OK, R = pcall(R)
OK = OK or Quit(2)
R.test_all = R.test_all or Quit(3)
- OK = pcall(R.test_all)
+ OK = xpcall(R.test_all, errorhandler)
Quit(OK and 0 or 4)
]], 0, "CtrlShiftF12")
elseif cmd == "browser" then