Skip to content

Discussion: Complex API error handling #4

@josevalim

Description

@josevalim

Not sure if the issues tracker is the correct place to discuss it but I don't necessarily agree with this smell. Semantically speaking, both solutions are equivalent. Multiple function clauses are actually compiled to a case. Second, the multiple function version is quite more verbose and indirect, which I think makes reading the code harder. I think it is more preferred to go from multiple clauses to a case (perhaps to address "Complex multi-clause function"), than vice-versa. :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions