Why is the Java client throwing unchecked exceptions?

The JavaDoc is (to be generous) rather sparse, and it’s often not immediately clear how everything works together, so getting unchecked exceptions (e.g. from ViewResponse) is a really frustrating. Throwing checked exceptions would at least give some indication of what sort of things could be expected to go wrong with any given method. As it is now you have to code+compile+cross your fingers that you don’t get an UnsupportedOperationException (which doesn’t indicate what’s unsupported exactly, just that something in your view request isn’t right).

Hi,

sorry for the sparse javadocs, we’ll be improving there. That said, for the new java SDK we are moving totally over to runtime exceptions, since most of the time its just a lack of docs than a matter of checked/unchecked.

There is a mixture because of legacy reasons, which we’ll clean up with the new major release series.
Feel free to raise an issue here http://www.couchbase.com/issues/browse/JCBC with docblocks that you’d like to see fleshed out.