3 ms·
> I am suggesting that the programmer could choose to store a backtrace in the error objects they choose to store in an `Err`. That's already possible, though
by masklinn 11y ago
> I am suggesting that the programmer could choose to store a backtrace in the error objects they choose to store in an `Err`.
That's already possible, though it requires nightly as it's an unstable "feature": http://doc.rust-lang.org/stable/std/rt/backtrace/index.html http://doc.rust-lang.org/stable/std/rt/backtrace/index.html
This will collect a stacktrace in the provided buffer, the result can then be stored in whatever object the developer wants (likely after decoding it to a String): http://is.gd/tOD8Ho http://is.gd/tOD8Ho
- kibwen 11y agoNote that you really don't want to be relying on this unstable feature, it's quite a hack at the moment and will very likely be moved out into an external crate.