From 991f7d231548a48c8c5183c8955bf241d69091d4 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Wed, 13 Nov 2013 15:54:56 +0100 Subject: [PATCH] cPluginManager:BindCommand() and :BindConsoleComman() now report full Lua stacktrace on failure. --- source/ManualBindings.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source/ManualBindings.cpp b/source/ManualBindings.cpp index 37274e2af..f98e25880 100644 --- a/source/ManualBindings.cpp +++ b/source/ManualBindings.cpp @@ -1347,7 +1347,9 @@ static int tolua_cPluginManager_BindCommand(lua_State * L) if (!self->BindCommand(Command, Plugin, Permission, HelpString)) { - // Refused. Possibly already bound. Error message has been given, bail out silently. + // Refused. Possibly already bound. Error message has been given, display the callstack: + cLuaState LS(L); + LS.LogStackTrace(); return 0; } @@ -1409,7 +1411,9 @@ static int tolua_cPluginManager_BindConsoleCommand(lua_State * L) if (!self->BindConsoleCommand(Command, Plugin, HelpString)) { - // Refused. Possibly already bound. Error message has been given, bail out silently. + // Refused. Possibly already bound. Error message has been given, display the callstack: + cLuaState LS(L); + LS.LogStackTrace(); return 0; }