Skip to content

Rust-style error handling #106

Open
@bavshin-f5

Description

@bavshin-f5

Yet another awkward pattern we repeat a lot

let x = call_fn();
if x.is_bad() {
    return core::Status::NGX_ERROR.into();
}

instead of more canonical let x = call_fn()?;.

We should convert as much of these cases as possible to a proper use of Result and std::error::Error implementations.
Some macro magic might be necessary to wrap existing nginx-sys APIs.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions