]> git.saurik.com Git - redis.git/commit - tests/unit/basic.tcl
Type mismatch errors are now prefixed with WRONGTYPE.
authorantirez <antirez@gmail.com>
Tue, 6 Nov 2012 19:25:34 +0000 (20:25 +0100)
committerantirez <antirez@gmail.com>
Tue, 6 Nov 2012 19:25:34 +0000 (20:25 +0100)
commitc4b0b6854e543ea1ae75b94ffc59b1285ddce9d5
tree7885bbd253b60aa4e7095b2dc472a15935ca55f0
parent06851a93de54c4d9bb0a6c52234ef5bb3db07d96
Type mismatch errors are now prefixed with WRONGTYPE.

So instead to reply with a generic error like:

-ERR ... wrong kind of value ...

now it replies with:

-WRONGTYPE ... wrong kind of value ...

This makes this particular error easy to check without resorting to
(fragile) pattern matching of the error string (however the error string
used to be consistent already).

Client libraries should return a specific exeption type for this error.

Most of the commit is about fixing unit tests.
src/redis.c
tests/unit/basic.tcl
tests/unit/bitops.tcl
tests/unit/type/list.tcl
tests/unit/type/set.tcl