8

Exception handling in c++ by manoj vasava

Embed Size (px)

DESCRIPTION

Exception handling in c++ by manoj vasava

Citation preview

Page 1: Exception handling in c++ by manoj vasava
Page 2: Exception handling in c++ by manoj vasava
Page 3: Exception handling in c++ by manoj vasava

Exception are run time unusual condition that a program may encounter while executing..

This unusual condition includes condition such as “division by zero”,” access to an array outside of its bound”, or “running out of memory or disk space”.

Page 4: Exception handling in c++ by manoj vasava

C++ provides built-in language features to detect and handle exception which are basically run time errors.

Exception handling provides a type safe, integrated approach, for coping with the unusual predictable problems that arise while executing a program.

Page 5: Exception handling in c++ by manoj vasava

We know that it is a very rare that a program works correctly first time.

It might have bugs. The two most common types of bugs are

logic errors and syntactic errors.

We often come across Some problems other than logic or syntax error. They are known as “exception”.

Page 6: Exception handling in c++ by manoj vasava

The logic errors occur due to poor understanding of the problem and solution procedure.

The syntax Errors Aries due to poor understanding of the language itself.

We can detect these errors using debugging and testing procedures.

Page 7: Exception handling in c++ by manoj vasava

Exception handling mechanism is needed because of inappropriateness of all the traditional solutions while working with objects and in distributed environment.

The following text stresses on the needs of exception handling:

1. Dividing the error handling2. Unconditional termination & programmer

preferred termination3. Separating error reporting and error handling4. The object destroy problem.

Page 8: Exception handling in c++ by manoj vasava

Thank you