Turn off traceback by default. Use xpcall with debug.traceback instead.
This commit is contained in:
@@ -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>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 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>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>
|
</ul></td></tr>
|
||||||
</table></td></tr></table>
|
</table></td></tr></table>
|
||||||
|
|||||||
@@ -521,9 +521,7 @@ public class LuaClosure extends LuaFunction {
|
|||||||
if (globals == null ) return msg;
|
if (globals == null ) return msg;
|
||||||
final LuaThread r = globals.running;
|
final LuaThread r = globals.running;
|
||||||
if (r.errorfunc == null)
|
if (r.errorfunc == null)
|
||||||
return globals.debuglib != null?
|
return msg;
|
||||||
msg + "\n" + globals.debuglib.traceback(level):
|
|
||||||
msg;
|
|
||||||
final LuaValue e = r.errorfunc;
|
final LuaValue e = r.errorfunc;
|
||||||
r.errorfunc = null;
|
r.errorfunc = null;
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user