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,
140 static Error syserr();
147 static Error syserr(
int errnum);
149#if defined(PROMEKI_PLATFORM_WINDOWS)
155 static Error syserr(DWORD winErr);
168 static Error syserr(
const std::error_code &ec);
174 Error(Code code = Ok) : _code(code) {}
180 bool operator==(
const Error &other)
const {
return _code == other._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; }
196 Code code()
const {
return _code; }
202 bool isOk()
const {
return _code == 0; }
208 bool isError()
const {
return _code != 0; }
214 const String &name()
const;
220 const String &desc()
const;
226 const String &systemErrorName()
const;
232 int systemError()
const;