dora-rs / dora

DORA (Dataflow-Oriented Robotic Application) is middleware designed to streamline and simplify the creation of AI-based robotic applications. It offers low latency, composable, and distributed dataflow capabilities. Applications are modeled as directed graphs, also referred to as pipelines.
https://dora-rs.ai
Apache License 2.0
1.36k stars 69 forks source link

More detailed error messages in C++ nodes #448

Closed phil-opp closed 3 months ago

phil-opp commented 3 months ago

The cxx crate that we use to bridge between Rust and C++ uses the Display implementation of errors. For eyre::Report errors, this means that only the outer context is printed, e.g. "failed to receive response". For debugging, it would be useful to use the Debug output instead, which prints the underlying causes as well.

To implement this, we could do a map_err(|e| eyre::eyre!("{e:?}")) call before returning to C++.