Exception Handling
Exception Handling
Exception Handling
Sushant Bhattarai
Types of Error
1. Syntax Error:
It occurs due to typing mistake or by writing
wrong syntax.
These can be corrected as they are
detected by compiler.
Types of Error
2. Logical Error
These kind of errors are hard to debug
because the program compiles and
executes successfully but produces
erroneous result.
Types of Error
3. Linker Error
Sometimes syntax and logic are both
correct but during linking error occurs due
to wrong function prototyping and
incorrect header files.
Types of Error
Er.Sushant Bhatta
Exceptions
Er.Sushant Bhatta
10.3 Try and catch block.
Er.Sushant Bhatta
try Block
Er.Sushant Bhatta
Throw Block