DESCRIPTION

SPY-13: Add ability to throw exception on view errors

Change-Id: I54a4f5dd1b5108eee516ba99c9eed6654ff200c3


COMMENTS

author: Kenny Maynard
date: 2011-09-06 03:14:20.745000000

Uploaded patch set 3.

-------------------------------------
author: Noah Dean
date: 2011-09-06 05:31:47.218000000

Patch Set 3: I would prefer that you didn't submit this

(3 inline comments)

I don't like the idea of optional exceptions.  Is there a good reason to do this?

Line:277, src/main/java/net/spy/memcached/CouchbaseClient.java -> Why would we want optional exceptions?  That seems like it could cause a lot of confusion.

Line:97, src/main/java/net/spy/memcached/internal/ViewWithDocsFuture.java -> Why don't you use a regular for loop here?  You've kind of reinvented it over three lines and gave an iterator a wider scope than necessary.

Line:77, src/main/java/net/spy/memcached/internal/ViewFuture.java -> Shouldn't the exception say what the problem was?

-------------------------------------
author: Kenny Maynard
date: 2011-09-06 05:44:39.508000000

Patch Set 3: (3 inline comments)



Line:277, src/main/java/net/spy/memcached/CouchbaseClient.java -> This is something Matt wanted (so the point of this commit). I'm going to wait for his feedback before making any changes here.

Line:97, src/main/java/net/spy/memcached/internal/ViewWithDocsFuture.java -> I'm not sure what your getting at here. Can you provide an example?

Line:77, src/main/java/net/spy/memcached/internal/ViewFuture.java -> I'm open to a better message, but we want to throw the exception here if the view has errors and I don't want to print out each error since there could be a lot.

-------------------------------------
author: Noah Dean
date: 2011-09-06 05:52:19.853000000

Patch Set 3: (2 inline comments)



Line:97, src/main/java/net/spy/memcached/internal/ViewWithDocsFuture.java -> How about:

   for(ViewRow r : view) {
    ...
   }

Line:77, src/main/java/net/spy/memcached/internal/ViewFuture.java -> All of them would be good.  As it is, the user just has no way to even know what went wrong.

-------------------------------------
author: Cory Peck
date: 2011-09-06 07:18:50.331000000

Patch Set 3: (1 inline comment)



Line:77, src/main/java/net/spy/memcached/internal/ViewFuture.java -> What if you'll provide callback for exceptions and will raise exception when the callback is null as default behavior?

In this case user can decide to raise exception with better message from callback or log it or something else.

I ruby client I use this approach.

-------------------------------------
author: Kenny Maynard
date: 2011-09-06 18:22:12.463000000

Patch Set 3: Abandoned

We will re-open this if there is a request from the user community.

-------------------------------------
