summaryrefslogtreecommitdiff
path: root/src/library/layout
diff options
context:
space:
mode:
Diffstat (limited to 'src/library/layout')
-rw-r--r--src/library/layout/page.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/library/layout/page.rs b/src/library/layout/page.rs
index 115a1923..c2fbaba0 100644
--- a/src/library/layout/page.rs
+++ b/src/library/layout/page.rs
@@ -201,7 +201,10 @@ impl Cast<Spanned<Value>> for Marginal {
Value::Str(v) => Ok(Self::Content(Content::Text(v))),
Value::Content(v) => Ok(Self::Content(v)),
Value::Func(v) => Ok(Self::Func(v, value.span)),
- _ => Err("expected none, content or function")?,
+ v => Err(format!(
+ "expected none, content or function, found {}",
+ v.type_name(),
+ )),
}
}
}