Terminate on error

Change-Id: Ic174369301d05cc67f32138b6a76d7f5426df8ab
Reviewed-on: http://review.couchbase.org/37958
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>