From 55bc67bf7989acfeadf0233a4bdd5660e8f0bb69 Mon Sep 17 00:00:00 2001 From: Steven Le Rouzic Date: Sun, 9 Jun 2024 23:34:38 +0200 Subject: Start work on render backend --- deimos/core/status.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'deimos/core/status.h') diff --git a/deimos/core/status.h b/deimos/core/status.h index 8141dad..3738ae9 100644 --- a/deimos/core/status.h +++ b/deimos/core/status.h @@ -14,6 +14,7 @@ enum class StatusCode : uint32_t kInvalidArgument, kUnimplemented, kInternal, + kRuntime, }; StringView StatusCodeToString(StatusCode code); @@ -106,6 +107,11 @@ inline Status InternalError(StringView message = {}) return Status(StatusCode::kInternal, message); } +inline Status RuntimeError(StringView message = {}) +{ + return Status(StatusCode::kRuntime, message); +} + namespace statusor_internals { }; @@ -150,7 +156,7 @@ public: Expects(!m_status.ok()); if (m_status.ok()) { - m_status = InternalError("StatusOr constructed from OK"); + m_status = InvalidArgumentError("StatusOr constructed from OK"); } } @@ -159,7 +165,7 @@ public: Expects(!m_status.ok()); if (m_status.ok()) { - m_status = InternalError("StatusOr constructed from OK"); + m_status = InvalidArgumentError("StatusOr constructed from OK"); } } -- cgit