Error handling
Table of Contents
- examples of temporary timeouts errorsnetwork
- network errors should be non-fatal, since they generally CAN be gracefully handled errors
- [A] Joe Duffy: the error model http://joeduffyblog.com/2016/02/07/the-error-model/ errors
- [C] Error Handling Survey errorsrust
- errors catching and rethrowing might be a good way of adding context
- TODO [B] Error handling is hard errors
- TODO [B] Post mypy err handling on GitHub as a separate thing errorstoblog
- TODO hmm, so setting cause doesn't really work with multiprocessing, it's lost errorspython
- STRT [C] could probably even post to /r/programming errorstoblog
- errorstoblog demonstrate for JS flow? https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/yield
- errorstoblog eh, someone already posted?..
¶examples of temporary timeouts errorsnetwork
CREATED: [2018-05-18]
requests.exceptions.ReadTimeout: requests.exceptions.ConnectionError: socket.timeout: _ssl.c:817: The handshake operation timed out File "/usr/lib/python3.6/socket.py", line 586, in readinto return self._sock.recv_into(b) ConnectionResetError: [Errno 104] Connection reset by peer
¶network errors should be non-fatal, since they generally CAN be gracefully handled errors
CREATED: [2018-04-09]
¶TODO add to post? errorstoblog
¶[A] Joe Duffy: the error model http://joeduffyblog.com/2016/02/07/the-error-model/ errors
¶[C] Error Handling Survey errorsrust
¶ catching and rethrowing might be a good way of adding context errors
¶TODO [B] Error handling is hard errors
Like so many other things, error handling ultimately is a trade-off. When we're writing our initial code, we don't want to think about errors. We code to the happy path. How productive would you be if you had to derail every line of code with thought processes around the myriad ways your code could fail? But then we're debugging a production issue, and we definitely want to think about errors. We curse our lazy selves for not handling an error case that obviously could have arisen. "Why did I decide to abort the process when the TCP connection failed? I should have retried! I should have logged the address I tried to connect to!"
¶TODO [B] Post mypy err handling on GitHub as a separate thing errorstoblog
CREATED: [2020-02-06]
¶TODO hmm, so setting cause doesn't really work with multiprocessing, it's lost errorspython
CREATED: [2021-01-28]
ugh. I guess the way to go is appending args
¶STRT [C] could probably even post to /r/programming errorstoblog
CREATED: [2019-10-23]