0

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 think 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?

4
  • 1
    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? Commented Apr 16, 2011 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... Commented Apr 16, 2011 at 13:21
  • 1
    Are developers not human? Just redefine where the blame lies, but keep the label! Commented Apr 16, 2011 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: blog.stackoverflow.com/2010/09/good-subjective-bad-subjective. Commented Apr 16, 2011 at 14:30

1 Answer 1

2

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.

1
  • 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! Commented Apr 16, 2011 at 14:51

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.