Fixed wrong call to erlang:error thanks to dialyzer

This is in code that's not supposed to be called at all (and thus
raises error). But it's good to be dialyzer clean. Somehow we were
missing that warning from dialyzer all this time.

Change-Id: If2f223e9d3bf8ee8e3dbc43ed7e6e6732e07cdaf
Reviewed-on: http://review.couchbase.org/42631
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>