`tracing::instrument` on `op_return_internal` is broken
tgolsson opened this issue · 1 comments
Noticed this when upping the log-level on an old project. If the return value doesn't have Protocol::DEBUG_STRING
it'll just hard-crash when the return happens. Took quite a while to figure out why... :D
rune/crates/rune/src/runtime/vm.rs
Lines 2029 to 2035 in fc2bc0c
I can point-fix it, but I think in general it'd be nicer if dbg! etc was less prone to exploding. Maybe an optional feature to "fall back" to something like <%T object at %p>
, which isn't what most people would want but won't lead to spurious BOOM.
Gaddangit! Well, I suppose we should add a fallible default debug impl than is used by default by Rust.
It should mostly be a matter of handling the error from the existing implementation.