[Glacier] Add proper string formatting for ErrorCodes.
This commit is contained in:
parent
a93aa3a426
commit
9f0e87b51d
5 changed files with 51 additions and 2 deletions
|
|
@ -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); \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue