mirror of https://github.com/rwf2/Rocket.git
Fix incorrect emission of config errors from templates.
This commit is contained in:
parent
0d2585051d
commit
f87b46d6c5
|
@ -164,11 +164,11 @@ impl Template {
|
||||||
|
|
||||||
match rocket.config().get_str("template_dir") {
|
match rocket.config().get_str("template_dir") {
|
||||||
Ok(dir) => template_root = rocket.config().root_relative(dir),
|
Ok(dir) => template_root = rocket.config().root_relative(dir),
|
||||||
Err(e@ConfigError::NotFound) => {
|
Err(ConfigError::NotFound) => { /* ignore missing configs */ }
|
||||||
|
Err(e) => {
|
||||||
e.pretty_print();
|
e.pretty_print();
|
||||||
warn_!("Using default directory '{:?}'", template_root);
|
warn_!("Using default templates directory '{:?}'", template_root);
|
||||||
}
|
}
|
||||||
Err(_) => { }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
match Context::initialize(template_root) {
|
match Context::initialize(template_root) {
|
||||||
|
|
Loading…
Reference in New Issue