Skip to content

Commit 1f72cc1

Browse files
emilkjprochazk
authored andcommitted
Improve error message for QueryError and DataLoaderError (#9998)
### Related * #1845 * #8681 ### What This problem keeps biting us in the ass: We get really bad error reports from users because the default `Display` for `anyhow::Error` only includes the latest context, and not the whole error 😠
1 parent 9403c83 commit 1f72cc1

File tree

4 files changed

+4
-2
lines changed

4 files changed

+4
-2
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6848,6 +6848,7 @@ dependencies = [
68486848
"re_build_info",
68496849
"re_chunk",
68506850
"re_crash_handler",
6851+
"re_error",
68516852
"re_log",
68526853
"re_log_encoding",
68536854
"re_log_types",

crates/store/re_data_loader/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ default = []
2727
re_arrow_util.workspace = true
2828
re_build_info.workspace = true
2929
re_chunk.workspace = true
30+
re_error.workspace = true
3031
re_log_encoding = { workspace = true, features = ["decoder"] }
3132
re_log_types.workspace = true
3233
re_log.workspace = true

crates/store/re_data_loader/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ pub enum DataLoaderError {
328328
#[error("No data-loader support for {0:?}")]
329329
Incompatible(std::path::PathBuf),
330330

331-
#[error(transparent)]
331+
#[error("{}", re_error::format(.0))]
332332
Other(#[from] anyhow::Error),
333333
}
334334

crates/store/re_query/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ pub enum QueryError {
6767
#[error("Not implemented")]
6868
NotImplemented,
6969

70-
#[error(transparent)]
70+
#[error("{}", re_error::format(.0))]
7171
Other(#[from] anyhow::Error),
7272
}
7373

0 commit comments

Comments
 (0)