Skip to content

Panic vs Error #77

Description

@alimoeeny

Hi @galeone :)
And as always, thank you for the hard work and for keeping the lights on.

I was wondering if you think it is possible to reduce the number of panic calls in this repository?
Would it be okay if I send you PRs that would remove the calls to panic and instead return an error?
If you think that is a reasonable thing to do, I assume we might need a separate develop branch for a while since these will be breaking changes (I mean backward incompatible) due to the changes in the signature of these functions?

One example is

panic(fmt.Errorf("unsupported image extension %s", ext))

where image.Read can return an error if the file extension is not recognized, rather than calling panic

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions