好久没在这里更新了,转一篇自己的英文博客。
Know Your Audience When You Are Spitting Out Error Messages
Different kinds of warnings and error messages unveil different level of details. Never show up error message like above to your end users. Two reasons:
- This makes NO sense at all to them. This makes users ANGRY!
- Security breach maybe introduced when you expose your whole call stack. (Plus, You may also trigger the hacking intention of some tech savvy users.)
3 levels of details for error messages:
- Debug Mode: for developers to debug along the development process. However this is a dirty and inefficient way of debugging. Only resort to this approach if your debugger can’t help you. And these messages should be removed before submitting to QA. And QAs should keep their eyes wide open for messages like this.
- Administrative: No error message should be popping up for the end user. All error should be logged under the hood. Information logged should be sufficient to reproduce the error.
- End User: a FRIENDLY message like below:
NEVER EVER show this to the end users:
原贴地址:http://blog.lynxstudiosoftware.com/2010/04/an-error-occurred/