Skip to content

Error Handling & Error Definition Statement #152

@tahadostifam

Description

@tahadostifam

Ideas:

error UserErr(struct { id: uint32 }) {
    Unauthorized   = struct { id = 1 },
    DuplicateEmail = struct { id = 2 },
}
error UserErr(int, char*) {
    Unauthorized   = (403, "unauthorized"),
    DuplicateEmail = (401, "duplicate email"),
}
error UserErr {
    Unauthorized,
    DuplicateEmail
}

What if we make the Error Data Structure Declaration using by a strong support of macros?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

New Phase

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions