Desktop Site (Beta)

Introductory Video

Writing good error messages

Loading

Follow to receive video recommendations   a   A
Speaker: Are you the speaker?

Anyone who has ever conducted an elementary programming course, or even answered a question on StackOverflow, will know that reading error messages is a skill that beginners have to learn. It is less widely appreciated that writing good error messages is also a skill that must be learnt. This talk is in two parts. The first covers the commonest error message gaffes: • Insufficiently explicit messages. • Issuing the same message for two different conditions. • Suppressing the stack trace. • Polluting the stack trace. The second part describes a way to ensure usable, actionable error messages, even when the writer of the message is not a professional coder. This was developed for an environment where superusers code up most of the dozens of data validation rules and the accompanying messages, and the application in which Python is embedded suppresses the stack trace.



Editors Note:

I am looking for editors/curators to help with branches of the tree. Please send me an email  if you are interested.  

Comment On Twitter