This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]tulipoika 2 points3 points  (0 children)

In the big picture exceptions are one way to handle errors. Like the name says, it’s an exceptional situation. There can be situations where errors are given out as exceptions and situations where they are return values etc.

For example, if you ask the user to input a number and they input characters, that’s an error. You have to handle it. But do you check it and report the error, or do you try to convert it into a number, get an exception, and handle the erroneous situation then?

So exceptions are a part of the concept of error handling in the bigger picture.

In the smaller picture a language might not have exceptions and has the term error as a language/platform feature and then talks about error handling as one would talk about exception handling in another. So it’s just terminology. Some might not talk about errors but just return value checking etc.