Module tch.xpcall

A version of the standard xpcall function that supports arguments.

In Lua 5.1 xpcall doesn't support calling a function with arguments. You would have to use a closure, which isn't that efficient if you have to call the function lots of times with varying arguments. They fixed this in Lua 5.2 but since we don't have that we create a backport.

Usage:

    local xpcall = require("tch.xpcall")
    local rc, result1, result2 = xpcall(some_func, debug.traceback, arg1, arg2)
    


generated by LDoc 1.4.5 Last updated 2017-05-04 22:24:31