Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Just started working as System Developer and dislikes the labeling of a home made exception: HumanErrorException. In my view, there is no such thing as a human error in a computer based system - just users who don't do as developer expected. So the real label for the exception would be DeveloperNotTakingUserBehaviourSeriouslyException, but I thing there will be a fight when i relabel :)

Have you ever seen a wrong labeled exception (type, class or method) around? If you did, what did you do with it?

share|improve this question

closed as primarily opinion-based by durron597, MichaelT, Snowman, GlenH7, Kilian Foth Jul 30 '15 at 10:17

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.If this question can be reworded to fit the rules in the help center, please edit the question.

Oh my, if these are problems you have the time to pay your attention to, you must really be doing good. But how about ErrareHumanumEstException? – Ingo Apr 16 '11 at 13:07
It's a decease I have from my education in Information Architecture where Labeling is one of four corner stones. :) I like your suggestion of naming the Exception... – Benny Skogberg Apr 16 '11 at 13:21
Are developers not human? Just redefine where the blame lies, but keep the label! – Matt Ellen Apr 16 '11 at 14:23
"there is no such thing [...] developer expected". All systems have constraints; they are what define the capabilities, intentions and focus of a system. Without constraints there is only chaos. A good example is the PE engine you are currently using. It is built to function within a set of guidelines to prevent chaos: – P.Brian.Mackey Apr 16 '11 at 14:30
up vote 1 down vote accepted

When I find something wrongly named in my opinion, I usually inform the person who made it and tell him the name I am suggesting. If I have the authority and seniority I will just inform and refactor. If I do not have the authority I will explain to him but if he is not convinced I will leave it as it is.

Regarding your case, I agree there is nothing called HumanErrorException and there is nothing called DeveloperNotTakingUserBehaviourSeriouslyException either. If the exception class is written in code, it means that the developer is aware and taking care of it already. Also Exceptions should be named after the error happened itself like ValueOutOfRangeExpecption, NullValueException and so on.

share|improve this answer
I agree - my suggested exception name isn't a valid one eighther. I have to think of a better name, or rewrite the code without the exception with a simple if...else construct. Thanx for your answer! – Benny Skogberg Apr 16 '11 at 14:51

Not the answer you're looking for? Browse other questions tagged or ask your own question.