CyberEngineMkIII
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Exception.hpp
Go to the documentation of this file.
1 #pragma once
3 namespace CYB {
5  namespace Exception {
7  class Base {
8  public:
10  enum class Level : byte {
11  VIOLATION,
12  SYSTEM_DATA,
13  INTERNAL,
14  UNIT,
15  };
16  public:
18  const unsigned int FErrorCode;
19  const Level FLevel;
20  protected:
29  Base(API::String::Static&& AMessage, const unsigned int AErrorCode, const Level ALevel) noexcept;
30  };
32  class Violation : public Base {
33  public:
35  enum ErrorCode : unsigned int {
42  };
43  private:
52  static API::String::Static ErrorMessage(const ErrorCode AErrorCode) noexcept;
53  public:
62  Violation(const ErrorCode AErrorCode) noexcept;
63  };
65  class SystemData : public Base{
66  public:
68  enum ErrorCode : unsigned int {
81  };
82  private:
91  static API::String::Static ErrorMessage(const ErrorCode AErrorCode) noexcept;
92  public:
101  SystemData(const ErrorCode AErrorCode) noexcept;
102  };
104  class Internal : public Base {
105  public:
107  enum ErrorCode : unsigned int {
117  };
118  private:
126  static API::String::Static ErrorMessage(const ErrorCode AErrorCode) noexcept;
127  public:
136  Internal(const ErrorCode AErrorCode) noexcept;
137  };
138  };
139 };
140 
141 #include "Exception.inl"
ErrorCode
The error code of the exception.
Definition: Exception.hpp:107
unsigned char byte
It's a byte, 8 bits, etc...
Definition: Types.hpp:4
static API::String::Static ErrorMessage(const ErrorCode AErrorCode) noexcept
Get the associated message for an exception.
ErrorCode
The error code of the exception.
Definition: Exception.hpp:35
An allocation was attempted with a negative size value.
Definition: Exception.hpp:40
Specific could not be loaded from given Module.
Definition: Exception.hpp:111
API::String::Static FMessage
An english description of the error, guaranteed to be compatible with CYB::API::String::UTF8.
Definition: Exception.hpp:17
Attempted to use a path greater than the maximum allowed byte value.
Definition: Exception.hpp:77
Memory protection could not be set.
Definition: Exception.hpp:109
A string pointing to unchanging data in the stack above it or the data segment. Must have UTF-8 encod...
Definition: StaticString.hpp:7
A required file was not found in the filesystem.
Definition: Exception.hpp:71
static API::String::Static ErrorMessage(const ErrorCode AErrorCode) noexcept
Get the associated message for an exception.
Internal(const ErrorCode AErrorCode) noexcept
Construct an Internal exception.
const unsigned int FErrorCode
The assigned error code.
Definition: Exception.hpp:18
A previously valid path has become invalidated, most likely due to deletion.
Definition: Exception.hpp:76
Exceptions caused by external call failures or invalid external data. Only classifies ones that can p...
Definition: Exception.hpp:65
An allocation was attempted with a size above 2047MB.
Definition: Exception.hpp:41
SystemData(const ErrorCode AErrorCode) noexcept
Construct a SystemData exception.
static API::String::Static ErrorMessage(const ErrorCode AErrorCode) noexcept
Get the associated message for an exception.
The current arrangment of arguments passed the function is invalid.
Definition: Exception.hpp:39
A heap has no block large enough for a requested allocation and expansion failed. ...
Definition: Exception.hpp:74
Tried to check the error code of a Process the OS would not allow.
Definition: Exception.hpp:115
A contructor passed to the engine was malformed.
Definition: Exception.hpp:37
Process could not be terminated, most likely due to insufficient priviledges.
Definition: Exception.hpp:116
const Level FLevel
The type of the exception.
Definition: Exception.hpp:19
Memory could not be commited from a reservation.
Definition: Exception.hpp:108
Level
The extended type of the exception.
Definition: Exception.hpp:10
Generic error for read failures. See functions for further documentation.
Definition: Exception.hpp:72
A file that was to be created exists.
Definition: Exception.hpp:70
Illegal call given prexisting conditions.
Definition: Exception.hpp:38
Base(API::String::Static &&AMessage, const unsigned int AErrorCode, const Level ALevel) noexcept
Construct a Base exception.
A system path could not be retrieved.
Definition: Exception.hpp:79
Exceptions that are thrown internally in the engine that the should never see, these are a superset o...
Definition: Exception.hpp:104
Tried to delete a non-empty directory.
Definition: Exception.hpp:69
ErrorCode
The error code of the exception.
Definition: Exception.hpp:68
Exceptions indicating an API contract violation. Should not be anticipated.
Definition: Exception.hpp:32
Violation(const ErrorCode AErrorCode) noexcept
Construct a Violation exception.
Generic error for write failures. See functions for further documentation.
Definition: Exception.hpp:73
The base exception recognized by the entire engine.
Definition: Exception.hpp:7
An operation was attempted with an invalid enum code.
Definition: Exception.hpp:36
Process could not be created for unknown reasons.
Definition: Exception.hpp:114