docs: add doc comments for error handling on major APIs#464
docs: add doc comments for error handling on major APIs#464keepsimple1 merged 3 commits intomainfrom
Conversation
|
Looks great! If you think it'd be helpful, I would also suggest adding an example for use std::thread;
let mdns = ServiceDaemon::new().or_else(|err| {
match err {
Error::Again => {
thread::sleep(Duration::from_secs(3));
ServiceDaemon::new()
}
_ => Err(err),
}
})?;Maybe something like this? Or perhaps using recursion. |
|
Thanks! I hear you. For As example, currently we have some basic ones in the overall doc usage, and also in example code. Are they helpful, or are you looking for example more specific for error handling? I updated one line in |
|
Ah, I see. I must have confused it with the Other than that I think the PR is good how it is now. |
|
Just to clarify, I didn't add example code of handling It seems some users handle |
This is to fix #463
DaemonShutdownfor a specific error.