Joe Duffy's article on error models is a treasure trove of language design insights: https://joeduffyblog.com/2016/02/07/the-error-model/ For example, I was interested to learn that error codes are not the most efficient approach, despite their simplicity.