15 return "Device not found or disconnected";
17 return "Device is busy or in use";
19 return "Property not supported by device";
21 return "Property value out of range";
23 return "Insufficient permissions";
25 return "System/platform error";
27 return "Invalid function argument";
29 return "Feature not implemented on this platform";
31 return "Unknown error";
36 : code_(code), message_(std::
move(message)) {}
40 if (message_.empty()) {
41 message_ =
code.message();
43 message_ +=
": " +
code.message();
49 if (!message_.empty()) {
50 desc +=
": " + message_;
Error(ErrorCode code, std::string message="")
Create error with code and message.
ErrorCode code() const
Get error code.
std::string description() const
Get full error description.
Result type that can contain either a value or an error.
ErrorCode
Error codes for duvc operations.
@ InvalidValue
Property value out of range.
@ InvalidArgument
Invalid function argument.
@ DeviceBusy
Device is busy or in use.
@ PermissionDenied
Insufficient permissions.
@ Success
Operation succeeded.
@ PropertyNotSupported
Property not supported by device.
@ NotImplemented
Feature not implemented on this platform.
@ SystemError
System/platform error.
@ DeviceNotFound
Device not found or disconnected.
const char * to_string(CamProp)
Convert camera property enum to string.
Result/Error type system for duvc-ctl.