You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
preserve last exception when things are going wrong
CircuitPython 8 supports exception chaining, so that the original
problem can be shown. Here's how it looks on desktop python3:
```
Traceback (most recent call last):
File "/home/jepler/src/bundle/libraries/helpers/requests/adafruit_requests.py", line 527, in _get_socket
sock.connect((connect_host, port))
ConnectionRefusedError: [Errno 111] Connection refused
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/jepler/src/bundle/libraries/helpers/requests/adafruit_requests.py", line 721, in get
return self.request("GET", url, **kw)
File "/home/jepler/src/bundle/libraries/helpers/requests/adafruit_requests.py", line 661, in request
socket = self._get_socket(host, port, proto, timeout=timeout)
File "/home/jepler/src/bundle/libraries/helpers/requests/adafruit_requests.py", line 508, in _get_socket
raise RuntimeError("Sending request failed") from last_exc
RuntimeError: Sending request failed
```
0 commit comments