anki / cozmo-python-sdk

Anki Cozmo Python SDK
Other
662 stars 430 forks source link

Surface SDK version errors more cleanly #154

Closed MarkWez closed 6 years ago

MarkWez commented 6 years ago

SDKVersionMismatch can now be caught by client code, if they wish to handle it separately. SDKVersionMismatch exception now includes SDK version along with required and actual App versions. After detecting the version mismatch, any remaining messages on the connection are ignored (to avoid throwing exceptions when they fail to unpack) If no valid device connection is found, and an SDKVersionMismatch was detected on any device, then that SDKVersionMismatch exception is returned instead of a general "no devices found" exception.