Compare commits

...

2 commits

Author SHA1 Message Date
c49188847a improve err 2025-05-26 07:00:00 +02:00
fc490f5d13 improve err 2025-05-26 07:00:00 +02:00
2 changed files with 2 additions and 2 deletions

View file

@ -294,7 +294,7 @@ const ENTITY_VAR_NAME: &str = "entity";
/// An error that can occur when internal [ScriptingPlugin] systems are being executed
#[derive(Error, Debug)]
pub enum ScriptingError {
#[error("script runtime error: {0}")]
#[error("script runtime error:\n {0}")]
RuntimeError(String),
#[error("script compilation error: {0}")]
CompileError(Box<dyn std::error::Error + Send>),

View file

@ -223,7 +223,7 @@ impl TryConvert for BevyVec3 {
impl From<magnus::Error> for ScriptingError {
fn from(value: magnus::Error) -> Self {
ScriptingError::RuntimeError(format!(
"error: {}\nbacktrace:\n{}\n",
"{}\nbacktrace:\n{}\n",
value.inspect(),
value
.value()