diff --git a/include/error.h b/include/error.h new file mode 100644 index 0000000..2b4fdac --- /dev/null +++ b/include/error.h @@ -0,0 +1,30 @@ +#ifndef _BOOTSTRAP_ERROR_H +#define _BOOTSTRAP_ERROR_H + +enum ErrorCode { + SUCCESS = 0, + + ERROR_CONFIG_ENV_CWD_INVALID, + ERROR_CONFIG_ENV_ROOT_DIR_INVALID, + ERROR_CONFIG_TARGET_NOT_FOUND, + ERROR_CONFIG_TARGET_NOT_DIR, + + ERROR_PARSER_SPEC_JSON_CANNOT_OPEN, + ERROR_PARSER_SPEC_JSON_INVALID_SYNTAX, + + ERROR_VALIDATOR_TOP_LEVEL_NOT_OBJECT, + ERROR_VALIDATOR_FIELD_NOT_OBJECT, + ERROR_VALIDATOR_FIELD_TYPE_INVALID, + ERROR_VALIDATOR_FIELD_TYPE_UNKNOWN, + ERROR_VALIDATOR_FIELD_PROMPT_INVALID, + + ERROR_EVALUATOR_RUN_SH_NOT_FOUND, + ERROR_EVALUATOR_RESPONSE_INVALID, +}; + +struct Error { + enum ErrorCode code; + const char *message; +}; + +#endif /* _BOOTSTRAP_ERROR_H */