How exception work | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How exception work

How try, catch and throw run on c++

1st May 2020, 11:36 AM
Rrrrrr
Rrrrrr - avatar
1 Answer
0
Exceptions help program work, in way that make program to complete in normal flow when if there is any error that may cause Program to terminate. We need to write the part of code that may cause to raise exception in the try block.. Catch block handle exception raised by try block and control passed to next statements immediately after catch. If there is no try, catch then Program stops execution where exception is raised... See this may help you understand it better way... https://www.javatpoint.com/cpp-try-catch
1st May 2020, 12:51 PM
Jayakrishna 🇮🇳