pointer-image   37   Provide Useful Error Messages


“Don’t scare the users, or even other programmers. Give them a nice, sanitized error message. Use something comforting like User Error. Replace, and Continue.”


As applications are deployed and put into use in the real world, things will fail from time to time. A computation module may fail, for instance, or the connection to a database server may be lost. When you can’t honor a user’s request, you want to handle it gracefully.

When such an error occurs, is it enough to pop up a graceful, apologetic message ...

Get Practices of an Agile Developer now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.