summaryrefslogtreecommitdiff
path: root/docs/src/html.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-03-08 10:54:04 +0100
committerLaurenz <laurmaedje@gmail.com>2023-03-08 11:02:27 +0100
commite5eab73374880077971f3f22acbdd3d302877128 (patch)
tree07aa926b27032d6bcd82486d664dfd4161ccbd3e /docs/src/html.rs
parent1b2b53ecb91a9bd7fb3493e471ae03cd142a7c03 (diff)
Streamline field names
Diffstat (limited to 'docs/src/html.rs')
-rw-r--r--docs/src/html.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/docs/src/html.rs b/docs/src/html.rs
index 7802ee10..33003349 100644
--- a/docs/src/html.rs
+++ b/docs/src/html.rs
@@ -309,7 +309,10 @@ fn code_block(resolver: &dyn Resolver, lang: &str, text: &str) -> Html {
let world = DocWorld(source);
let mut frames = match typst::compile(&world, &world.0) {
Ok(doc) => doc.pages,
- Err(err) => panic!("failed to compile {text}: {err:?}"),
+ Err(err) => {
+ let msg = &err[0].message;
+ panic!("while trying to compile {text}:\n\nerror: {msg}");
+ }
};
if let Some([x, y, w, h]) = zoom {