summaryrefslogtreecommitdiffhomepage
path: root/Private/KernelKit/HError.hpp
blob: 0d412154a1b7a8f0a9a42eaa36b97886fd7fae96 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
 *	========================================================
 *
 *	HCore
 * 	Copyright Mahrouss Logic, all rights reserved.
 *
 * 	========================================================
 */

#pragma once

#include <NewKit/Defines.hpp>

namespace HCore {
typedef Int32 HError;

inline constexpr HError kErrorSuccess = 0;
inline constexpr HError kErrorExecutable = 33;
inline constexpr HError kErrorExecutableLib = 34;
inline constexpr HError kErrorFileNotFound = 35;
inline constexpr HError kErrorDirectoryNotFound = 36;
inline constexpr HError kErrorDiskReadOnly = 37;
inline constexpr HError kErrorDiskIsFull = 38;
inline constexpr HError kErrorProcessFault = 39;
inline constexpr HError kErrorSocketHangUp = 40;
inline constexpr HError kErrorThreadLocalStorage = 41;
inline constexpr HError kErrorMath = 42;
inline constexpr HError kErrorNoNetwork = 43;
inline constexpr HError kErrorHeapOutOfMemory = 44;

Boolean ke_bug_check(void) noexcept;
}  // namespace HCore

#define KernIsOk(HERR) (HERR == HCore::kErrorSuccess)
#define KernHasFailed(HERR) (HERR != HCore::kErrorSuccess)