mudgangster

Log | Files | Refs

commit 9ad2f84f81b81e47bbcca3ee63ae50f536d827e5
parent 3e1d0acd550162b693d3d6e6364c8bfc3771b38f
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Fri,  7 Sep 2018 10:33:49 +0300

Use xpcall for alias stack traces

Diffstat:
src/lua/alias.lua | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lua/alias.lua b/src/lua/alias.lua @@ -9,10 +9,10 @@ local function doAlias( line ) for i = 1, #alias.callbacks do local callback = alias.callbacks[ i ] - local ok, err, subs = pcall( string.gsub, args, callback.pattern, callback.callback ) + local ok, err, subs = xpcall( string.gsub, debug.traceback, args, callback.pattern, callback.callback ) if not ok then - mud.print( debug.traceback( "\n#s> alias callback failed: %s" % err ) ) + mud.print( "\n#s> alias callback failed: %s" % err ) return true end