Skip to content

Commit a223343

Browse files
committed
Improve error recovery when serving
1 parent 9b36cee commit a223343

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/build.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@ pub async fn watch_build<P: AsRef<Path>>(source: P, dest: P, watch: bool) -> Res
4747

4848
loop {
4949
match rx.recv() {
50-
Ok(_) => build(&mut engine, true)?,
50+
Ok(_) => {
51+
if let Err(err) = build(&mut engine, true) {
52+
println!("build error: {:?}", &err);
53+
}
54+
}
5155
Err(err) => println!("watch error: {:?}", &err),
5256
}
5357
}
@@ -61,7 +65,7 @@ pub async fn watch_build<P: AsRef<Path>>(source: P, dest: P, watch: bool) -> Res
6165
build_result.unwrap();
6266
} else if let Err(err) = build_result {
6367
println!("Error: {}", &err);
64-
std::process::exit(1);
68+
//std::process::exit(1);
6569
}
6670
Ok(())
6771
}

0 commit comments

Comments
 (0)