Skip to content

rss2i.py: Give some error messages after catching an exception

The rss2i command line tool should try to catch all exceptions that can be raised. However, it should print some verbose error messages, so that the (non-expert) user knows what actually went wrong.

Reproduce

Under linux you could try e.g.

rss2i.py -a getid

with the user having no permission to access the serial ports.

Actual Example Result

rss2i: Detecting connected devices... []
rss2i: _establish_device_connections@1344: ERR_NO_DEVICES_FOUND: automatic device detection

Suggested Example Result

rss2i: Detecting connected devices... []
rss2i: error: Could not establish serial connection: <more detailed error description>