mirror of
https://github.com/build-cpp/cmkr
synced 2026-06-08 13:22:55 +00:00
34 lines
516 B
C++
34 lines
516 B
C++
#pragma once
|
|
|
|
#ifdef __cplusplus
|
|
namespace cmkr::error {
|
|
|
|
struct Status {
|
|
enum class Code {
|
|
Success = 0,
|
|
RuntimeError,
|
|
InitError,
|
|
GenerationError,
|
|
BuildError,
|
|
CleanError,
|
|
InstallError,
|
|
};
|
|
Status(Code ec) noexcept;
|
|
operator int() const noexcept;
|
|
Code code() const noexcept;
|
|
|
|
private:
|
|
Code ec_ = Code::Success;
|
|
};
|
|
|
|
} // namespace cmkr::error
|
|
|
|
extern "C" {
|
|
#endif
|
|
|
|
const char *cmkr_error_status_string(int);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|