X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/00cf82c0bd9e0272a06f086b00a70d5d5d0f5e31..28d1ee2cda01bccdd2424f8fdbb4a924de37eaa3:/tests/support/redis.tcl?ds=inline diff --git a/tests/support/redis.tcl b/tests/support/redis.tcl index 4f8ac485..99415b64 100644 --- a/tests/support/redis.tcl +++ b/tests/support/redis.tcl @@ -142,9 +142,15 @@ proc ::redis::redis_multi_bulk_read fd { set count [redis_read_line $fd] if {$count == -1} return {} set l {} + set err {} for {set i 0} {$i < $count} {incr i} { - lappend l [redis_read_reply $fd] + if {[catch { + lappend l [redis_read_reply $fd] + } e] && $err eq {}} { + set err $e + } } + if {$err ne {}} {return -code error $err} return $l } @@ -160,7 +166,7 @@ proc ::redis::redis_read_reply fd { - {return -code error [redis_read_line $fd]} $ {redis_bulk_read $fd} * {redis_multi_bulk_read $fd} - default {return -code error "Bad protocol, $type as reply type byte"} + default {return -code error "Bad protocol, '$type' as reply type byte"} } }