aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Peter Wang <novalazy@gmail.com>2014-04-16 22:59:20 +1000
committerGravatar David Bremner <david@tethera.net>2014-09-16 20:17:15 +0200
commit034102303eb4a2577ea06a453241fed6fe882322 (patch)
treefba09549d1a8c2cfef472a77ff2bc6e85e4e2eb7
parentd81fc4b42de2687a06046d068fe391282b0b8b8f (diff)
ruby: handle return status of database close
Throw an exception if notmuch_database_destroy fails.
-rw-r--r--bindings/ruby/database.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/bindings/ruby/database.c b/bindings/ruby/database.c
index e84f726d..c03d7011 100644
--- a/bindings/ruby/database.c
+++ b/bindings/ruby/database.c
@@ -113,11 +113,13 @@ notmuch_rb_database_open (int argc, VALUE *argv, VALUE klass)
VALUE
notmuch_rb_database_close (VALUE self)
{
+ notmuch_status_t ret;
notmuch_database_t *db;
Data_Get_Notmuch_Database (self, db);
- notmuch_database_destroy (db);
+ ret = notmuch_database_destroy (db);
DATA_PTR (self) = NULL;
+ notmuch_rb_status_raise (ret);
return Qnil;
}