Skip to main content
spelling, grammar
Source Link
Jalayn
  • 9.8k
  • 4
  • 40
  • 58

I think this has more to do with "evolution" of error handling. With C/C++ (before exception handling was added) languages, if a function fail'sfailed, the only way to tell was through the return value (e.g. HRESULT in win32). So typically you ended up catching exit codes of each function call and do a check. This approach makes code messier. And lot of times developers will just ignore to do this checkavoid adding these checks out of laziness.

With the introduction of exception handling, developers now devs had two options to raise erroran error. So the "exception" word was used to distinguish errors from "exit status" errors. OverAfter a period of time, exception handling has become a popular means of error propagationway to propagate errors because code is much easier to read, maintain and there can be a single place where you can have error handling logic.

I think this has more to do with "evolution" of error handling. With C/C++ (before exception handling was added) languages, if function fail's, the only way to tell was through return value (e.g. HRESULT in win32). So typically you ended up catching exit codes of each function call and do a check. This approach makes code messier. And lot of times developers will just ignore to do this check out of laziness.

With introduction of exception handling, now devs had two options to raise error. So "exception" word was used to distinguish errors from "exit status" errors. Over period of time, exception handling has become popular means of error propagation because code is much easier to read, maintain and there can be single place where you can have error handling logic.

I think this has more to do with "evolution" of error handling. With C/C++ (before exception handling was added) languages, if a function failed, the only way to tell was through the return value (e.g. HRESULT in win32). So typically you ended up catching exit codes of each function call and do a check. This approach makes code messier. And lot of times developers will just avoid adding these checks out of laziness.

With the introduction of exception handling, developers now had two options to raise an error. So the "exception" word was used to distinguish errors from "exit status" errors. After a period of time, exception handling has become a popular way to propagate errors because code is much easier to read, maintain and there can be a single place where you can have error handling logic.

added 34 characters in body
Source Link
Ankush
  • 139
  • 3

I think this has more to do with "evolution" of error handling. With C/C++ (before exception handling was added) languages, if function fail's, the only way to tell was through return value (e.g. HRESULT in win32). So typically you ended up catching exit codes of each function call and do a check. This approach makes code messier. And lot of times developers will just ignore to do this check out of laziness.

With introduction of exception handling, now onedevs had two options to raise error. So "exception" word was used to distinguish errors from "exit status" errors. Over period of time, exception handling has become popular means of error propagation because code is much easier to read, maintain and there can be onesingle place where you can handle all errorshave error handling logic.

I think this has more to do with "evolution" of error handling. With C/C++ (before exception handling was added) languages if function fail's only way to tell was through return value (e.g. HRESULT in win32). So typically you ended up catching exit codes of each function and do a check. This approach makes code messier. And lot of times developers will just ignore to do this check out of laziness.

With introduction of exception handling now one had two options to raise error. So "exception" word was used to distinguish errors from "exit status" errors. Over period of time, exception handling has become popular means of error propagation because code is much easier to read and there can be one place where you can handle all errors.

I think this has more to do with "evolution" of error handling. With C/C++ (before exception handling was added) languages, if function fail's, the only way to tell was through return value (e.g. HRESULT in win32). So typically you ended up catching exit codes of each function call and do a check. This approach makes code messier. And lot of times developers will just ignore to do this check out of laziness.

With introduction of exception handling, now devs had two options to raise error. So "exception" word was used to distinguish errors from "exit status" errors. Over period of time, exception handling has become popular means of error propagation because code is much easier to read, maintain and there can be single place where you can have error handling logic.

Source Link
Ankush
  • 139
  • 3

I think this has more to do with "evolution" of error handling. With C/C++ (before exception handling was added) languages if function fail's only way to tell was through return value (e.g. HRESULT in win32). So typically you ended up catching exit codes of each function and do a check. This approach makes code messier. And lot of times developers will just ignore to do this check out of laziness.

With introduction of exception handling now one had two options to raise error. So "exception" word was used to distinguish errors from "exit status" errors. Over period of time, exception handling has become popular means of error propagation because code is much easier to read and there can be one place where you can handle all errors.