Closed jezmck closed 5 years ago
Thank you for the report.
Note that you already can have the error message if you trap the exception yourself -- e.g:
>>> from rak811 import Rak811ResponseError
>>> try:
... raise Rak811ResponseError(-5)
... except Rak811ResponseError as e:
... print("[Errno {}] {}".format(e.errno, e.strerror))
...
[Errno -5] Not joined
But I will enhance the default message in the backtrace to produce:
>>> from rak811 import Rak811ResponseError
>>> raise Rak811ResponseError(-5)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
rak811.rak811.Rak811ResponseError: [Errno -5] Not joined
Thanks. I'm new to Python and appreciate your advice.
0.6.5 has been released on PyPI, just update your library and you will get more descriptive error messages.
sudo pip3 install --upgrade rak811
So that e.g. the following can be more descriptive.
rak811.rak811.Rak811ResponseError: -5
equates to "CODE_NOT_JOIN", which, while a little unnatural, is more useful.