Closed
Description
Code:
extern crate handlebars;
fn main() {
let handlebars = handlebars::Handlebars::new();
let e = handlebars.render_template("{{ whoops", &std::collections::BTreeMap::<String, String>::new()).unwrap_err();
let e: Box<dyn std::error::Error> = Box::new(e);
println!("{}", e);
println!("{}", e.source().unwrap());
println!("{:?}", e.source().unwrap().source());
}
Expected output:
Template error: invalid handlebars syntax.
--> Template error in "Unnamed template":1:10
|
0 | {{ whoops
|---------
|
= reason: invalid handlebars syntax.
<panic because no source>
Actual output:
Template error: invalid handlebars syntax.
--> Template error in "Unnamed template":1:10
|
0 | {{ whoops
|---------
|
= reason: invalid handlebars syntax.
Template error: invalid handlebars syntax.
--> Template error in "Unnamed template":1:10
|
0 | {{ whoops
|---------
|
= reason: invalid handlebars syntax.
None
I haven't tested, but this could also be the case for other functions.
Metadata
Metadata
Assignees
Labels
No labels