Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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
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? –  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
1  
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: blog.stackoverflow.com/2010/09/good-subjective-bad-subjective. –  P.Brian.Mackey Apr 16 '11 at 14:30
add comment

1 Answer

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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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