API 参考Qnbot Exo PlusC++

错误与异常

通用参考

当前版本 · 1.4.0

ExoControlError 继承 QnBotError,构造参数和访问器包括:

ExoControlError(
    std::string message,
    ExoControlErrorKind kind,
    std::optional<std::string> command = std::nullopt,
    std::optional<std::int32_t> device_code = std::nullopt,
    std::optional<std::string> detail = std::nullopt
);

ExoControlErrorKind 成员:not_connected、invalid_lifecycle、unsupported、unavailable、busy、timeout、protocol、device_rejected、transport、cancelled。

SDK 将生命周期错误报告为 LifecycleError,将当前设备或配置不提供的功能报告为 UnavailableFeatureError。无效参数和关闭句柄分别使用 InvalidArgumentError 与 ClosedHandleError,设备选择还可能使用 AmbiguousSelectionError 或 NotFoundSelectionError。