Hi,
I'm trying to contribute some code but get stuck in error handling.
One example I found for returning error is below. However, the progname and err are both None, which seems not very helpful.
|
Err(MesaError { |
|
exitcode: exitcode, |
|
progname: None, |
|
err: None, |
|
}) |
Another example I found is below. This line is quite difficult to understand for new contributors.
|
None => Err(failure::err_msg(format!("invalid hostname: {}", hostname_os.to_string_lossy())).compat())?, |
Could you give some guildeline for error handling in mesabox?
Hi,
I'm trying to contribute some code but get stuck in error handling.
One example I found for returning error is below. However, the
prognameanderrare both None, which seems not very helpful.mesabox/src/posix/chmod/mod.rs
Lines 161 to 165 in e906540
Another example I found is below. This line is quite difficult to understand for new contributors.
mesabox/src/networking/ping/mod.rs
Line 279 in e906540
Could you give some guildeline for error handling in mesabox?