Example & Tutorial understanding programming in easy ways.

What is exception handling in C++?

What is exception;
Basically, runtime error is called as exception

Exception handling:
Exception Handling in C++ is a process to handle runtime errors. We perform exception handling so the normal flow of the application can be maintained even after runtime errors.

Advantage:
It maintain the flow of the program.

Example-
-divisible by zero is the exception in mathematics so that it can't be resolve in the programs but it can be handled in C++.

Exception handling keyword:
try
catch
throw

Try:
We put that part of program inside the try block in which there is a chance of exception or error.

Catch:
If there is an exception in try block then control goes on Catch block.

Throw:
It is used to create a program exception.




Read More →
Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!