Files
Odin/core/flags/errors.odin
gingerBill f4dd48aa5d Add core:flags
Based on the Feoramund's original package
2024-06-04 19:08:03 +01:00

30 lines
374 B
Odin

package flags
import "base:runtime"
Parse_Error_Type :: enum {
None,
Extra_Pos,
Bad_Type,
Missing_Field,
Missing_Value,
}
Parse_Error :: struct {
type: Parse_Error_Type,
message: string,
}
Validation_Error :: struct {
message: string,
}
Help_Request :: distinct bool
Error :: union {
runtime.Allocator_Error,
Parse_Error,
Validation_Error,
Help_Request,
}