fixes #522; more specific error thrown when no rows are updated

Fix for #522. Some of the design decisions were made in that thread.

I'm relatively new to node and JS so any feedback is greatly appreciated.