mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-26 09:03: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,
|
||||
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
|
||||
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
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue