mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-29 18:33:01 +00:00
safe_function: only log error when there's actually an error
This commit is contained in:
parent
b6c41395f6
commit
ea1c17a6e3
1 changed files with 1 additions and 1 deletions
|
@ -86,10 +86,10 @@ function safe_function(fn, args, player_name, error_msg, cmdname)
|
||||||
stack_trace = stack_trace,
|
stack_trace = stack_trace,
|
||||||
error_msg = error_msg
|
error_msg = error_msg
|
||||||
})
|
})
|
||||||
|
minetest.log("error", "[//"..tostring(cmdname).."] Caught error from running function ", fn, "with args", weac.inspect(args), "for player ", player_name, "with provided error message", error_msg, ". Stack trace: ", stack_trace)
|
||||||
return false, stack_trace
|
return false, stack_trace
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.log("error", "[//"..tostring(cmdname).."] Caught error from running function ", fn, "with args", weac.inspect(args), "for player ", player_name, "with provided error message", error_msg, ". Stack trace: ", stack_trace)
|
|
||||||
|
|
||||||
return true, retvals
|
return true, retvals
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue