7
\$\begingroup\$

There is a cluster of tags of a similar nature. How should we synonymize them?

Interestingly, is the least general term, but is the most popular.

\$\endgroup\$
10
\$\begingroup\$

I find encompasses all others, in a more language-agnostic way. For example VB6/VBA doesn't have exceptions, but that doesn't stop anyone from handling errors.

Therefore, I'd make the "master" and the synonym.

The tag wiki for sadly doesn't say what questions it should be used for, but I'd argue that it has the potential of being applicable to, say, a question about designing exception classes (although I've never seen a CR question specifically about that), which somewhat relates to but not quite close enough to make it a synonym. We'd have to actually look at how the tag is used in these 36 questions to see if any retagging should happen, though.

Also the tag wiki excerpts should be edited to include proper usage guidelines.

\$\endgroup\$
3
\$\begingroup\$

In my experience error-handling is a process that is common to all languages, when there's an error, you handle it (if you're a decent programmer).

As has been pointed out by NHGrif, many languages have fine-grained control of what error conditions exist, and often differentiates these error subtypes with names that include Error, Exception, and possibly others.

Using either tag error-handling or exception-handling for the basic concept of handling situations when things go wrong, will lead to confusion for those people who's language gives special meaning to either (or both) terms.

So, I suggest using a neutral name for the actual tag, and then synonymizing both and to this new tag. Names I would suggest are:

For those with some mainframe knowledge, 'abend' is the term used for many filure modes, and is described on wikipedia here: Abnormal End. This may be an interesting tag ...

\$\endgroup\$
  • \$\begingroup\$ I think I'm going to vote for error-condition or maybe abnormal-flow \$\endgroup\$ – nhgrif Aug 3 '14 at 13:04
2
\$\begingroup\$

I agree that is the most generic and others should be synonyms of it. I actually tried to propose that synonym this morning, but has more questions and the system wouldn't let me. (That's what brought me to meta actually.) For simplicity's sake, I see no issue with it being the other way around. I would like to see someone propose the synonym. I would, but I don't have the required score on the tag.


I have proposed a synonym as the confusion between these two tags cropped up again. Although there are great arguments for keeping them separate, or even perhaps creating a master tag for both, I don't think the average programmer will fuss much about the technical definition. I think synomizing to is clear and makes sense. Furthermore, it will be easily found when a user starts to type either "Error" or "Exception".

\$\endgroup\$
1
\$\begingroup\$

Assuming this is still an open issue and the synonym hasn't been created yet, I'd like to argue that and be kept separate, and we make an effort to make sure all questions are appropriately tagged.

Errors and exceptions are very different. The fact that several programming languages seem to treat these identically or simply not use errors is an issue unto itself and outside the scope of Code Review or Code Review Meta.

Perhaps part of the problem may lie with the fact that different languages think of errors and exceptions differently.


In Objective-C, an exception is thought as a problem with the program that can only be fixed by changing the source code. These are thought of as truly exceptional behavior, and barring them being in a try-catch block, they will crash the program. Meanwhile, try-catch blocks are heavily discouraged in Objective-C because we have errors.

In Objective-C, an error is thought of as an expected but irregular problem in the execution. The most common example I can think of comes with all the problems you'd run into with file IO. The methods used to do file IO take a pointer to a pointer to an error object. If there was an error, this pointer will have an error object for the program to diagnose, other was the error is nil. Either way, the fact that the error happened will never crash the program. If you were simply writing to file, you could never even check the error and just be okay with the write failing. Your program wouldn't be that great, but it wouldn't crash either--and it shouldn't crash.


Swift treats errors and exceptions the same as Objective-C.

A quick Google search shows that at least Java and Haskell also make this distinction between errors and exceptions, though almost have an opposite attitude. You put lots of stuff in try-catches and handle exceptions. Meanwhile, errors tend to be the result of source code that must be fixed.

There are almost certainly other languages that make the distinction as well.


Yes, we should be sure that questions have appropriate tags (if there aren't any true questions, just remove the tag for now), but synonymizing these two tags and treating them as if they are the same thing would be about as bad as synonymizing and or and . Sure, they're quite closely related, but they're definitely two distinct things.

\$\endgroup\$
  • 1
    \$\begingroup\$ Would having the tag fault-handling as the base name for both synonyms help, since it uses neither error, nor exception in the name? \$\endgroup\$ – rolfl Aug 3 '14 at 12:46
  • \$\begingroup\$ This is a really good point, but will we be able to continually make sure the tags are properly used? \$\endgroup\$ – RubberDuck Aug 3 '14 at 12:48
  • \$\begingroup\$ I don't quite like fault since the first thing I think of is a segfault, which is a form of an exception or error I guess... but seems more specific. If they need to be under a single tag, why not a tag that has both error and exception in it's name? What's the character limit for tags? \$\endgroup\$ – nhgrif Aug 3 '14 at 12:53
  • \$\begingroup\$ A signal handler that traps these things is also an exception handler, handling the exceptional conditions.... \$\endgroup\$ – rolfl Aug 3 '14 at 12:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .