diff --git a/src/runner/runner.rs b/src/runner/runner.rs index 130702a..3bc3dfc 100644 --- a/src/runner/runner.rs +++ b/src/runner/runner.rs @@ -16,8 +16,8 @@ pub enum Error{ impl std::fmt::Display for Error{ fn fmt(&self,f:&mut std::fmt::Formatter<'_>)->std::fmt::Result{ match self{ - Self::Lua{source,error:mlua::Error::RuntimeError(s)}=>write!(f,"lua error: {s}\nsource:{source}"), - Self::RustLua(mlua::Error::RuntimeError(s))=>write!(f,"rust-side lua error: {s}"), + Self::Lua{source,error}=>write!(f,"lua error: source:\n{source}\n{error}"), + Self::RustLua(error)=>write!(f,"rust-side lua error: {error}"), other=>write!(f,"{other:?}"), } }