How exception work | SoloLearn: Learn to code for FREE!


How exception work

How try, catch and throw run on c++

5/1/2020 11:36:06 AM


1 Answer

New Answer


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...