fix(lua): return error with context

maybe wasteful? but i really want this to show error strings
This commit is contained in:
əlemi 2024-08-15 03:45:50 +02:00
parent f1b8d83bac
commit b51e55570f
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -9,7 +9,10 @@ use tokio::sync::broadcast;
impl From::<CodempError> for LuaError { impl From::<CodempError> for LuaError {
fn from(value: CodempError) -> Self { fn from(value: CodempError) -> Self {
LuaError::RuntimeError(value.to_string()) LuaError::WithContext {
context: value.to_string(),
cause: std::sync::Arc::new(LuaError::external(value)),
}
} }
} }