Ensure error message is only created if ODE is thrown

Change-Id: I923340a8fb6061688d240c1b4429e500d15fb933
Reviewed-on: http://review.couchbase.org/43323
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Tested-by: Jeffry Morris <jeffrymorris@gmail.com>