diff --git a/src/script.rs b/src/script.rs index a17b7ab..360f4d6 100644 --- a/src/script.rs +++ b/src/script.rs @@ -1,10 +1,21 @@ use rbx_dom_weak::types::Ref; +#[derive(Debug)] pub enum Error{ Runner(mlua::Error), NoScript, NoSource, } +impl Error{ + pub fn print(self){ + match self{ + Self::Runner(mlua::Error::RuntimeError(s))=>{ + println!("lua error: {s:?}"); + }, + other=>println!("{:?}",other), + } + } +} pub struct Script{ script:Ref,