How to write a great error message

This is a fantastic rant from Thomas Fuchs on error messages and how to do them well (with lots of examples of how not to write error messages).