mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-12-27 07:47:31 +01:00
safe_function: only log error when there's actually an error
This commit is contained in:
parent
b6c41395f6
commit
ea1c17a6e3
@ -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 New Issue
Block a user