1#ifndef TOPAZ_CORE_ERROR_HPP
2#define TOPAZ_CORE_ERROR_HPP
42 constexpr std::array<const char*, static_cast<int>(error_code::_count)> error_code_strings
46 "precondition failure error",
47 "invalid value error",
48 "machine unsuitability error",
50 "driver hazard error",
52 "out of CPU memory error",
53 "out of GPU memory error",
54 "concurrent usage error"
58 constexpr const char* error_code_name(
error_code ec)
60 return detail::error_code_strings[
static_cast<int>(ec)];
63 std::string_view last_error();
64 void set_last_error(std::string errmsg);
error_code
Error codes for Topaz.
Definition error.hpp:14
@ machine_unsuitable
An error has occurred because the currently running machine does not support the given operation.
Definition error.hpp:24
@ invalid_value
An error has occurred because an illegal/incorrect value has been detected.
Definition error.hpp:22
@ success
Correct behaviour has occurred. No need to do any sanity checking.
Definition error.hpp:16
@ engine_bug
An error has occurred due to an engine-side logic error, and you should submit a bug report.
Definition error.hpp:26
@ voom
An error has occurred due to lack of GPU memory.
Definition error.hpp:34
@ unknown_error
An error has occurred, but it's not clear why.
Definition error.hpp:30
@ driver_hazard
An error has occurred due to a serious hazard relating to the driver/hardware. This most likely means...
Definition error.hpp:28
@ precondition_failure
An error has occurred because some previously-required setup has not been complete....
Definition error.hpp:20
@ concurrent_usage
An error has occurred due to an operation being invalid while a given resource is in use by something...
Definition error.hpp:36
@ oom
An error has occurred due to lack of CPU memory.
Definition error.hpp:32
@ partial_success
Nothing erroneous happened, but the process did not complete fully or otherwise provide an ideal resu...
Definition error.hpp:18