From b51e55570fd3c9787688c14e4bd3795d4bea341e Mon Sep 17 00:00:00 2001 From: alemi Date: Thu, 15 Aug 2024 03:45:50 +0200 Subject: [PATCH] fix(lua): return error with context maybe wasteful? but i really want this to show error strings --- src/ffi/lua.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ffi/lua.rs b/src/ffi/lua.rs index 30d910b..09083c1 100644 --- a/src/ffi/lua.rs +++ b/src/ffi/lua.rs @@ -9,7 +9,10 @@ use tokio::sync::broadcast; impl From:: for LuaError { fn from(value: CodempError) -> Self { - LuaError::RuntimeError(value.to_string()) + LuaError::WithContext { + context: value.to_string(), + cause: std::sync::Arc::new(LuaError::external(value)), + } } }