promise runtime err
This commit is contained in:
parent
2a05b9a50d
commit
bd4b377fc6
2 changed files with 4 additions and 2 deletions
|
|
@ -1,5 +1,5 @@
|
|||
def test_func
|
||||
rust_func.and_then lambda { |x|
|
||||
$state['x'] = x
|
||||
print('abc' + 5)
|
||||
}
|
||||
end
|
||||
|
|
|
|||
|
|
@ -368,7 +368,9 @@ impl Runtime for RubyRuntime {
|
|||
.into_iter()
|
||||
.map(|x| ruby.get_inner(x.0).as_value())
|
||||
.collect();
|
||||
let result: magnus::Value = f.funcall("call", args.as_slice()).unwrap();
|
||||
let result: magnus::Value = f.funcall("call", args.as_slice()).map_err(|e| {
|
||||
ScriptingError::RuntimeError(Box::new(io::Error::other(e.to_string())))
|
||||
})?;
|
||||
Ok(RubyValue::new(result))
|
||||
}))
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue