MB-12251: Better error messages for emits

When there were non-valid emits the error messages weren't meaningful.
This commits adds nicer error messages and tests accordingly.

Change-Id: I9950866667f9a9990cb29aed3f260e4f4564fdbe
Reviewed-on: http://review.couchbase.org/41773
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Sarath Lakshman <sarath@couchbase.com>