diff --git a/crates/rune/src/runtime/value.rs b/crates/rune/src/runtime/value.rs index 2227cbcf9..77bd13d4a 100644 --- a/crates/rune/src/runtime/value.rs +++ b/crates/rune/src/runtime/value.rs @@ -2035,7 +2035,15 @@ impl fmt::Debug for Value { let mut o = Formatter::new(); if value.string_debug(&mut o).is_err() { - return Err(fmt::Error); + match value.type_info() { + VmResult::Ok(type_info) => { + write!(f, "<{} object at {:p}>", type_info, value)?; + } + VmResult::Err(_) => { + write!(f, "", value)?; + } + } + return Ok(()); } f.write_str(o.as_str())?;