Turn off traceback by default. Use xpcall with debug.traceback instead.

This commit is contained in:
James Roseborough
2015-04-11 23:06:16 +00:00
parent 2c50d505eb
commit 977353080c
2 changed files with 2 additions and 3 deletions

View File

@@ -984,6 +984,7 @@ Files are no longer hosted at LuaForge.
<li>Make string metatable a proper metatable, and make it read-only by default.</li>
<li>Add sample code that illustrates techniques in creating sandboxed environments.</li>
<li>Add convenience methods to Global to load string scripts with custom environment.</li>
<li>Turn off default traceback. Use xpcall() with debug.traceback instead.</li>
</ul></td></tr>
</table></td></tr></table>

View File

@@ -521,9 +521,7 @@ public class LuaClosure extends LuaFunction {
if (globals == null ) return msg;
final LuaThread r = globals.running;
if (r.errorfunc == null)
return globals.debuglib != null?
msg + "\n" + globals.debuglib.traceback(level):
msg;
return msg;
final LuaValue e = r.errorfunc;
r.errorfunc = null;
try {