IceShard
1
A personal game engine project, with development focused on 2D/2.5D games.
Toggle main menu visibility
Loading...
Searching...
No Matches
core
public
ice
error_codes.hxx
Go to the documentation of this file.
1
3
4
#pragma once
5
#include <
ice/error.hxx
>
6
7
namespace
ice
8
{
9
10
static
constexpr
ice::ErrorCodeSuccess
S_Ok
{
"S.0000:General:Success"
};
11
static
constexpr
ice::ErrorCodeSuccess
S_Success
=
S_Ok
;
12
13
static
constexpr
ice::ErrorCodeError
E_Fail
{
"E.0001:General:Unknown error"
};
14
static
constexpr
ice::ErrorCodeError
E_Error
=
E_Fail
;
15
16
static
constexpr
ice::ErrorCode
E_InvalidArgument
{
"E.0002:General:Invalid argument provided"
};
17
static
constexpr
ice::ErrorCode
E_OutOfRange
{
"E.0003:General:Accessing value out of range"
};
18
static
constexpr
ice::ErrorCode
E_NotImplemented
{
"E.0004:General:Function or method is not implemented"
};
19
static
constexpr
ice::ErrorCode
E_NullPointer
{
"E.0005:General:Passed '{nullptr}' to function expecting valid pointer."
};
20
static
constexpr
ice::ErrorCode
E_NullPointerData
{
"E.0006:General:Passed 'Data{nullptr}' object to function expecting valid data."
};
21
static
constexpr
ice::ErrorCode
E_NullPointerMemory
{
"E.0007:General:Passed 'Memory{nullptr}' object to function expecting valid memory."
};
22
static
constexpr
ice::ErrorCode
E_TaskCanceled
{
"E.1001:Tasks:Task canceled"
};
23
24
// Aliases are comparable
25
static_assert
(
S_Ok
==
S_Success
);
26
static_assert
(
E_Fail
==
E_Error
);
27
28
// Success is not an error
29
static_assert
(
S_Success
!=
E_Error
);
30
31
// Generic Error comparable with specific error but not vice versa.
32
static_assert
(
E_Error
==
E_InvalidArgument
);
33
static_assert
(
E_TaskCanceled
!=
E_InvalidArgument
);
34
35
}
// namespace ice
error.hxx
ice
SPDX-License-Identifier: MIT.
Definition
array.hxx:12
ice::E_Fail
static constexpr ice::ErrorCodeError E_Fail
Definition
error_codes.hxx:13
ice::E_NullPointerData
static constexpr ice::ErrorCode E_NullPointerData
Definition
error_codes.hxx:20
ice::E_TaskCanceled
static constexpr ice::ErrorCode E_TaskCanceled
Definition
error_codes.hxx:22
ice::E_InvalidArgument
static constexpr ice::ErrorCode E_InvalidArgument
Definition
error_codes.hxx:16
ice::E_Error
static constexpr ice::ErrorCodeError E_Error
Definition
error_codes.hxx:14
ice::E_OutOfRange
static constexpr ice::ErrorCode E_OutOfRange
Definition
error_codes.hxx:17
ice::S_Success
static constexpr ice::ErrorCodeSuccess S_Success
Definition
error_codes.hxx:11
ice::S_Ok
static constexpr ice::ErrorCodeSuccess S_Ok
Definition
error_codes.hxx:10
ice::E_NullPointerMemory
static constexpr ice::ErrorCode E_NullPointerMemory
Definition
error_codes.hxx:21
ice::E_NotImplemented
static constexpr ice::ErrorCode E_NotImplemented
Definition
error_codes.hxx:18
ice::E_NullPointer
static constexpr ice::ErrorCode E_NullPointer
Definition
error_codes.hxx:19
ice::ErrorCodeError
Definition
error.hxx:99
ice::ErrorCode
Definition
error.hxx:19
ice::ErrorCodeSuccess
Definition
error.hxx:91
Generated by
1.18.0