Skip to content

Servo should use unwrap() less #40744

@mrobinson

Description

@mrobinson

We should gradually phase out our use of unwrap() for graceful error handling or expect(). expect() should only be used for cases where an internal invariant has been violated. All values that go through or come from external crates should never have unwrap() or expect() called on them.

Reasoning: A web engine is an incredibly complicated piece of software that deals with unreliable, and often malicious, input. As much as possible, all operations should be considered fallible and failures handled as best as possible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    B-high-valueRepresents work that would have a big impactE-very-complexVery difficult. Do not attempt without significant relevant experience and motivation.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions