gregoriusxu / booksleeve

Automatically exported from code.google.com/p/booksleeve
Other
0 stars 0 forks source link

ISortedSetCommands.Score() fails when redis returns <nil> #23

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.Try to run the ISortedSetCommands.Score() against either a nonexistent key or 
nonexistent member.

What is the expected output? What do you see instead?
I expect some kind of representation for nil when no score is returned. 
Instead, I get a null reference (value cannot be null) exception at 
   at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt)
   at System.Double.Parse(String s, IFormatProvider provider)
   at BookSleeve.MessageResult`1.Complete(RedisResult result) in c:\BuildAgent\work\4fa0cfb72d79d4c0\BookSleeve\MessageResult.cs:line 33.

What version of the product are you using? On what operating system?
latest, Windows 7

Please provide any additional information below.

Maybe this should return a "double?"? or maybe it should follow the xmldoc 
comment and return a string (/// <returns>the score of member (a double 
precision floating point number), represented as string.</returns>)

Original issue reported on code.google.com by rhag...@gmail.com on 30 Aug 2012 at 10:32

GoogleCodeExporter commented 8 years ago
Fixed for Rank and Score; an API-breaking change, unfortunately

Original comment by marc.gravell on 17 Oct 2012 at 12:27