Exception Handling - PowerPoint PPT Presentation

1 / 7
About This Presentation
Title:

Exception Handling

Description:

Introduction Exceptions are errors or some peculiar problems other than logic or syntax errors. Exceptions are runtime anomalies or unusual conditions that a program ... – PowerPoint PPT presentation

Number of Views:58
Avg rating:3.0/5.0
Slides: 8
Provided by: 56861324
Category:

less

Transcript and Presenter's Notes

Title: Exception Handling


1
Exception Handling
2
Introduction
  • Exceptions are errors or some peculiar problems
    other than logic or syntax errors.
  • Exceptions are runtime anomalies or unusual
    conditions that a program may encounter while
    executing.

3
Introduction
  • Anomalies includes
  • Division by zero
  • Access to an array outside of its bounds
  • Running out of memory or disk space

4
Basics of Exception Handling
  • The purpose of exception handling mechanism is to
    provide means to detect and report an exceptional
    circumstances so that appropriate action can be
    taken.
  • Exceptions are of two types
  • Synchronous Exception
  • Out-of-range index
  • Over-flow
  • Asynchronous Exception
  • Keyboard interrupts

5
Basics of Exception Handling
  • The mechanism has error handling code that
    perform the following tasks
  • Find the problem ( Hit the exception )
  • Inform that an error has occurred ( Throw the
    exception )
  • Receive the error information ( Catch the
    exception )
  • Take corrective actions ( Handle the exception )

6
Exception Handling Mechanism
  • The error handling code basically consists of two
    segments
  • One to detect errors and to throw exceptions
  • Other to catch the exceptions and to take
    appropriate actions.

7
Thank You
Write a Comment
User Comments (0)
About PowerShow.com