]> git.notmuchmail.org Git - notmuch/blobdiff - bindings/ruby/database.c
ruby: handle return status of database close
[notmuch] / bindings / ruby / database.c
index e84f726d1bf5576814a019062e883e604f0ba467..c03d7011f8406931045183a02eeb0d1395eb0107 100644 (file)
@@ -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;
 }