fix(lua): dont throw error, return a string

while less "correct", dealing with the error in lua is really awful.
also its too late to deal with that error anyway, it was in another
thread
This commit is contained in:
əlemi 2024-09-18 00:30:23 +02:00
parent d215b4ab0b
commit c5ab72280a
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -38,7 +38,8 @@ fn entrypoint(lua: &Lua) -> LuaResult<LuaTable> {
val.push_back(arg.into_lua(lua)?);
}
Some(ext::callback::LuaCallback::Fail(msg)) => {
return Err(LuaError::runtime(msg));
val.push_back(false.into_lua(lua)?);
val.push_back(msg.into_lua(lua)?);
},
}
Ok(val)