mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2025-01-27 06:33:20 -05:00
improve error msg on config file problems
This commit is contained in:
parent
a4bc7f5218
commit
5248ebc51f
@ -131,8 +131,12 @@ fn read_config(path: &Path) -> Result<ConfigFile, Error> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn run(args: Args) -> Result<i32, Error> {
|
pub fn run(args: Args) -> Result<i32, Error> {
|
||||||
let config = read_config(&args.config)
|
let config = read_config(&args.config).with_context(|_| {
|
||||||
.with_context(|_| format!("unable to read {}", &args.config.display()))?;
|
format!(
|
||||||
|
"Unable to load config file {}. See documentation in ref/config.md.",
|
||||||
|
&args.config.display()
|
||||||
|
)
|
||||||
|
})?;
|
||||||
|
|
||||||
let mut builder = tokio::runtime::Builder::new_multi_thread();
|
let mut builder = tokio::runtime::Builder::new_multi_thread();
|
||||||
builder.enable_all();
|
builder.enable_all();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user