[Glacier] Add proper string formatting for ErrorCodes.

This commit is contained in:
Drew Galbraith 2023-11-22 12:17:10 -08:00
parent a93aa3a426
commit 9f0e87b51d
5 changed files with 51 additions and 2 deletions

View file

@ -2,6 +2,8 @@
#include <stdint.h>
#include "glacier/string/string_view.h"
namespace glcr {
enum ErrorCode : uint64_t {
@ -29,6 +31,8 @@ enum ErrorCode : uint64_t {
};
StringView ErrorCodeToStr(ErrorCode code);
#define RET_ERR(expr) \
{ \
glcr::ErrorCode _tmp_err = static_cast<glcr::ErrorCode>(expr); \