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.
@ invalid_value
An error has occurred because an illegal/incorrect value has been detected.
@ success
Correct behaviour has occurred. No need to do any sanity checking.
@ engine_bug
An error has occurred due to an engine-side logic error, and you should submit a bug report.
@ voom
An error has occurred due to lack of GPU memory.
@ unknown_error
An error has occurred, but it's not clear why.
@ driver_hazard
An error has occurred due to a serious hazard relating to the driver/hardware. This most likely means...
@ precondition_failure
An error has occurred because some previously-required setup has not been complete....
@ concurrent_usage
An error has occurred due to an operation being invalid while a given resource is in use by something...
@ oom
An error has occurred due to lack of CPU memory.
@ partial_success
Nothing erroneous happened, but the process did not complete fully or otherwise provide an ideal resu...