Add information to debugging.
This commit is contained in:
parent
ddd97bc66a
commit
9efa81d1fe
1 changed files with 4 additions and 3 deletions
7
mobs.lua
7
mobs.lua
|
@ -169,12 +169,13 @@ for _, mob in pairs(mob_stats) do
|
|||
if minetest.registered_entities[mob.name] then
|
||||
minetest.registered_entities[mob.name].on_punch_orig = minetest.registered_entities[mob.name].on_punch
|
||||
minetest.registered_entities[mob.name].on_punch = function(...)
|
||||
local error = pcall(fun_caves_punch, ...)
|
||||
if error ~= true then
|
||||
local status, err = pcall(fun_caves_punch, ...)
|
||||
if status ~= true then
|
||||
print('***********************')
|
||||
print('Fun Caves: fun_caves_punch failed with error message:')
|
||||
print(error)
|
||||
print(err)
|
||||
print(...)
|
||||
print(debug.traceback())
|
||||
print('Please report this error.')
|
||||
print('***********************')
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue