diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-09-11 12:04:37 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-09-11 12:04:37 +0200 |
| commit | 921b40cf9cb75c6412e2421130671b08dcf1ee13 (patch) | |
| tree | 817735ec1d2dabcbb0cd3d38f73f5e2772eb5300 /crates/typst-cli/src/query.rs | |
| parent | 6483d3035bab4df2d644acb738974413977aaa37 (diff) | |
Forward third-party errors
Better to know something even if it isn't always formatted in the prettiest way
Diffstat (limited to 'crates/typst-cli/src/query.rs')
| -rw-r--r-- | crates/typst-cli/src/query.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/typst-cli/src/query.rs b/crates/typst-cli/src/query.rs index 68cf3319..55f04fe8 100644 --- a/crates/typst-cli/src/query.rs +++ b/crates/typst-cli/src/query.rs @@ -31,7 +31,7 @@ pub fn query(command: &QueryCommand) -> StrResult<()> { let serialized = format(data, command)?; println!("{serialized}"); print_diagnostics(&world, &[], &warnings, command.common.diagnostic_format) - .map_err(|_| "failed to print diagnostics")?; + .map_err(|err| eco_format!("failed to print diagnostics ({err})"))?; } // Print diagnostics. @@ -43,7 +43,7 @@ pub fn query(command: &QueryCommand) -> StrResult<()> { &warnings, command.common.diagnostic_format, ) - .map_err(|_| "failed to print diagnostics")?; + .map_err(|err| eco_format!("failed to print diagnostics ({err})"))?; } } |
