Impl Store::update() interface function
This commit is contained in:
parent
c87fa74169
commit
6875376f91
1 changed files with 14 additions and 1 deletions
|
@ -198,7 +198,20 @@ methods!(
|
|||
// On error: Nil + Exception
|
||||
//
|
||||
fn update(fle: RFileLockEntry) -> NilClass {
|
||||
unimplemented!()
|
||||
let fle = typecheck!(fle).unwrap().clone();
|
||||
|
||||
call_on_store! {
|
||||
store <- itself wrapped inside STORE_WRAPPER,
|
||||
real_fle <- fetch fle,
|
||||
operation {
|
||||
if let Err(e) = store.update(real_fle) {
|
||||
trace_error(&e);
|
||||
VM::raise(Class::from_existing("RuntimeError"), e.description());
|
||||
}
|
||||
NilClass::new()
|
||||
},
|
||||
on fail return NilClass::new()
|
||||
}
|
||||
}
|
||||
|
||||
// Delete a FileLockEntry from the store
|
||||
|
|
Loading…
Reference in a new issue