lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Wed, 2007-11-28 at 20:11 -0700, Patrick Donnelly wrote:
> Am I missing something or is this "impossible"? Would it be possible
> in a future version of Lua to get this:
> 
> xpcall(func, err, ...)

do
  local real_xpcall = xpcall
  function xpcall(func, err, ...)
    return real_xpcall(function() return func(...) end, err)
  end
end

Might do the trick for you.

D.

-- 
Daniel Silverstone                         http://www.digital-scurf.org/
PGP mail accepted and encouraged.            Key Id: 2BC8 4016 2068 7895