basho/riak-ruby-client — pull request #140 by overlycommonname (2014-01-07 00:11:17+00:00)
Title: Change NotImplementedError to IOError

Riak Ruby Client uses NotImplementedError when it tries to save an object that it does not have a serializer for. This is an inappropriate use of NotImplementedError, which is properly reserved for cases when you're attempting to interact with a system resource that is not available and is clearly essential to the proper running of your program (such as trying to fork in a non-forking environment).

Because NotImplementedError is intended for use in catastrophic situations, it does not descend from StandardError and bypasses ordinary rescues. So if you have a layer of your application that has a catch-all rescue meant to prevent errors from bubbling up into your main server loop? Sorry! NotImplementedError will jump right through there and get into your server loop, quite possibly crashing the entire process (which is indeed what happened to us). Which seems harsh for something that basically means, "I wasn't able to save this particular entry in Riak."