aboutsummaryrefslogtreecommitdiff
path: root/core/flags/errors.odin
blob: 6acd26c20731ac60e0dabaa4ead3c73bf3f4f309 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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,
}