projects
/
notmuch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d81fc4b
)
ruby: handle return status of database close
author
Peter Wang
<novalazy@gmail.com>
Wed, 16 Apr 2014 12:59:20 +0000
(22:59 +1000)
committer
David Bremner
<david@tethera.net>
Tue, 16 Sep 2014 18:17:15 +0000
(20:17 +0200)
Throw an exception if notmuch_database_destroy fails.
bindings/ruby/database.c
patch
|
blob
|
history
diff --git
a/bindings/ruby/database.c
b/bindings/ruby/database.c
index e84f726d1bf5576814a019062e883e604f0ba467..c03d7011f8406931045183a02eeb0d1395eb0107 100644
(file)
--- 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;
}