errors.odin 374 B

1234567891011121314151617181920212223242526272829
  1. package flags
  2. import "base:runtime"
  3. Parse_Error_Type :: enum {
  4. None,
  5. Extra_Pos,
  6. Bad_Type,
  7. Missing_Field,
  8. Missing_Value,
  9. }
  10. Parse_Error :: struct {
  11. type: Parse_Error_Type,
  12. message: string,
  13. }
  14. Validation_Error :: struct {
  15. message: string,
  16. }
  17. Help_Request :: distinct bool
  18. Error :: union {
  19. runtime.Allocator_Error,
  20. Parse_Error,
  21. Validation_Error,
  22. Help_Request,
  23. }