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.
Related Posts
Really cute approach to reporting type errors: when there's a type error, show an example of a runtime error that the type check has prevented!
Data-Driven Techniques for Type Error Diagnosis https://escholarship.org/uc/item/59s4h4pv
Doing another iteration on my diagnostics display. I'm reasonably happy with the bold highlighting within the error message.
I'm not sure about the colour on Warning and Error though. It gives the output some visual structure, but arguably the message itself is more important.
I'm a huge fan of Swift's 'Error Handling Rationale' design document: https://github.com/swiftlang/swift/blob/9315673c003875158852579bd1f33480cdec5461/docs/ErrorHandlingRationale.md#fundamentals
It carefully defines terminology and compares with other languages, so you can understand Swift's position and preference in the design space.