lua-users home
lua-l archive

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


Hello,

I have the following code :

       local socket = require("socket")
       local clt = socket.try(socket.connect( "celeron.chez.moi", 7634 ))
       local try = socket.newtry(function() clt:close() end)
       local s, err = clt:receive('*a')
       clt:close()

And I'm testing it with Lua 5.1.5

It tried it on 2 machines with "similar" configuration.
On the first machine, is it working, but on a second one, I got a
    /usr/bin/lua: (error object is not a string)

As per http://www.luafaq.org/, it's due to 'error' handling.
Any idea how I can trouble shoot ?

Thanks

Laurent

PS: the fun part in a remote machine with the code is working, and is it
on the famous "celeron" when the code is failing.