Tag Archives: exceptions

Don't Write Insulting Error Messages

Error messages are incredibly important in communicating to the user when something happened that the program was not designed to handle.  Programmers usually write these messages, and there are common pitfalls to avoid.

Posted in Coding, Design, practice | Tagged , , , , | Leave a comment

Is Non-existence an Error?

You call a method to retrieve information about an object with a  particular ID, but the record does not exist.  Is this an exception?   Or not?  It is hard to answer.

Posted in Coding | Tagged , , | Leave a comment

Two Kinds of Exceptions

An exception is a message from the system to the user about something that the program can not handle. There are a couple of main categories of exceptions: environmental and program logic. They warrant quite different treatment.

Posted in Coding, Design, Poor Error Msg, practice | Tagged , , , , | Leave a comment

Error messages should be very literal

We all struggle with the correct wording for error messages. It is not easy. But I ran across an example today that should help understanding

Posted in Coding, Poor Error Msg | Tagged , | 1 Comment

Error-First Design in JSON/REST/AngularJS integration

You have heard about “mobile-first” when creating your UI, but there is something you should do before you start designing the UI:  you should design the error handling/display mechanism first.

Posted in Coding | Tagged , , , | Leave a comment

"Oops something failed" is NOT acceptable error message

I try to keep track of real-life situations where poor error messages appear. That happened again today. This message was displayed to the user:

Posted in Coding, Poor Error Msg | Tagged , , | Leave a comment

Robust Web Application Initialization

When a web based application starts up, it should do so carefully to avoid a number of problems.  This post outlines the problems you might run into, and a list of coding preparations that can be made to avoid these … Continue reading

Posted in Coding | Tagged , , , , , | Leave a comment

Error Message should be clear, plain, and direct

This post is about a real error message I received and puzzled through.  Luckily, because I was working with open source code, I was able to see a copy of the source, and only then did I understand what the … Continue reading

Posted in Coding, Example Code, Poor Error Msg | Tagged , , , | 2 Comments

Surprising outrageous file handling

I don’t usually focus on bad examples of code (because there are so many ways to do it wrong they are rarely repeated) but here I found a particular pattern that was pernicious and repeated all through the code, indicating … Continue reading

Posted in Coding | Tagged , | Leave a comment

Method Exception Signature

In short, all interface methods, if they throw anything, should be declared to throw ‘java.lang.Exception’ and never a specialized exception class.  Find this surprising? then please read on.  The original goal to allow methods to declare the type of exceptions … Continue reading

Posted in Coding, Design | Tagged , , , , , , | 3 Comments