c++ exception handling

Errors and Exception Handling in C++

Current Status
Not Enrolled
Get Started

Compared to the programming language C, C++ offers the possibility to cleanly separate the handling of exceptions from the normal program flow. This contributes among other things to the clarity of the program. However, the concept of exception handling was added somewhat later, in 1989. This meant that the original compiler concept had to be completely revised.

The central element of error handling is the exception object. In C ++ an exception can have any type, i.e. both a primitive data type such as int or const char *, or any class or structure. There are some predefined standard exceptions, but you can also create your own.

Exceptions in software development are used to ensure that certain situations are handled separately. Certain exceptions are thrown when a problem is detected and allow error handling anywhere in the code.