Fix incorrect emission of config errors from templates.

This commit is contained in:
Sergio Benitez 2017-11-17 12:24:33 -08:00
parent 0d2585051d
commit f87b46d6c5
1 changed files with 3 additions and 3 deletions

View File

@ -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) {