diff options
author | Steven Le Rouzic <steven.lerouzic@gmail.com> | 2024-06-09 23:34:38 +0200 |
---|---|---|
committer | Steven Le Rouzic <steven.lerouzic@gmail.com> | 2024-06-09 23:34:38 +0200 |
commit | 55bc67bf7989acfeadf0233a4bdd5660e8f0bb69 (patch) | |
tree | ab61b00bfd351c32cc99298f4466c86baf6d1514 /deimos/core/status.h | |
parent | 909304e44763c58c0ebbe40068a58784ebaced7b (diff) |
Start work on render backend
Diffstat (limited to 'deimos/core/status.h')
-rw-r--r-- | deimos/core/status.h | 10 |
1 files changed, 8 insertions, 2 deletions
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");
}
}
|