[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Luasocket FTP (client transfers) and copas don't play well together
- From: Sam Roberts <vieuxtech@...>
- Date: Thu, 25 Mar 2010 14:28:06 -0700
On Thu, Mar 25, 2010 at 1:56 PM, Jon Nalley <lists@bluebot.org> wrote:
> If I prevent socket.protect() from being overridden by copas the error
> is returned as expected. I am not sure if copcall() is making
> assumptions about the exceptions that it may catch or if it is
> actually encapsulating the error message in a table. I am continuing
As I recall, socket.try() encapsulates the emsg in a table before
throwing it, and socket.protect() checks if the error is a table. If
it is, it assumes it was raised by try(), unwraps it, and returns
nil,emsg. Otherwise it just reraises it.
Could it be that copas's definition of socket.protect is not quite right?
Sam