mjbrown / bgapi

A python package for communicating with BlueGiga modules through their proprietary API.
39 stars 25 forks source link

BlueGigaAPI does not support custom error #23

Open eblot opened 7 years ago

eblot commented 7 years ago

From a BG script, it is possible to define and use custom error codes.

Unfortunately, error code is dispatched through a dictionary that triggers an exception for any non-standard error code. Custom errors > 0x80 are translated into error code > 0x480 on client side.

It would be nice to provide a custom instance for RESULT_CODE (or any better way to handle and dispatch custom errors)