[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Error handling strategy for Redis multi-bulk replies, in context of Lua bindings
- From: Sean Conner <sean@...>
- Date: Thu, 24 Mar 2011 01:33:41 -0400
It was thus said that the Great Alexander Gladysh once stated:
>
> For multibulk replies it is plain wrong — user does want to see
> results of execution of other commands in MULTI/EXEC.
>
> To give some concrete example:
>
> MULTI
> SET a 3
> LPOP a
> INCR a
> EXEC
>
> Returns:
>
> 1. OK
> 2. (error) ERR Operation against a key holding the wrong kind of value
> 3. (integer) 4
>
> How should this result be returned to Lua?
>
> {
> "OK",
> -- how to express error message here?
> 4
> }
>
> Any hints?
How about:
{
{ true , "OK" } ,
{ false , error_value } ,
{ true , 4 }
}
-spc