impl Store::delete() interface function
This commit is contained in:
parent
c2b146aad8
commit
c87fa74169
1 changed files with 13 additions and 1 deletions
|
@ -209,7 +209,19 @@ methods!(
|
|||
// On error: Nil + Exception
|
||||
//
|
||||
fn delete(sid: RStoreId) -> NilClass {
|
||||
unimplemented!()
|
||||
let sid = typecheck!(sid).unwrap().clone();
|
||||
|
||||
call_on_store! {
|
||||
store <- itself wrapped inside STORE_WRAPPER,
|
||||
operation {
|
||||
if let Err(e) = store.delete(sid) {
|
||||
trace_error(&e);
|
||||
VM::raise(Class::from_existing("RuntimeError"), e.description());
|
||||
}
|
||||
NilClass::new()
|
||||
},
|
||||
on fail return NilClass::new()
|
||||
}
|
||||
}
|
||||
|
||||
// Save a FileLockEntry in a new path inside the store, keep the RFileLockEntry
|
||||
|
|
Loading…
Reference in a new issue