11#include <promeki/config.h>
12#if PROMEKI_ENABLE_CORE
13#include <system_error>
17PROMEKI_NAMESPACE_BEGIN
59 UnsupportedSystemError,
63 PixelFormatNotSupported,
120 PipelineRuntimeError,
121 InspectorDiscontinuityDetected,
126 AuthenticationRequired,
142 static Error syserr();
149 static Error syserr(
int errnum);
151#if defined(PROMEKI_PLATFORM_WINDOWS)
157 static Error syserr(DWORD winErr);
170 static Error syserr(
const std::error_code &ec);
176 Error(Code code = Ok) : _code(code) {}
182 bool operator==(
const Error &other)
const {
return _code == other._code; }
184 bool operator!=(
const Error &other)
const {
return _code != other._code; }
186 bool operator<(
const Error &other)
const {
return _code < other._code; }
188 bool operator<=(
const Error &other)
const {
return _code <= other._code; }
190 bool operator>(
const Error &other)
const {
return _code > other._code; }
192 bool operator>=(
const Error &other)
const {
return _code >= other._code; }
198 Code code()
const {
return _code; }
204 bool isOk()
const {
return _code == 0; }
210 bool isError()
const {
return _code != 0; }
216 const String &name()
const;
222 const String &desc()
const;
228 const String &systemErrorName()
const;
234 int systemError()
const;