Skip to content

Do we have a guideline for handling error? #27

@rdzhou

Description

@rdzhou

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions