CS132L-Lesson1

CS132L-Lesson1 - Lesson1 ExceptionHandling Objectives:

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Lesson 1 Exception Handling  Objectives: At the end of the discussion, laboratory demonstration and exercise, the students at  a minimum will be able to: 1. Differentiate try-catch from if-else statement, 2. Identify the function of try-catch statement in C++, 3. Correctly utilize try-catch statement in writing/creating programs with error  handling procedures. 
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Lesson 1 – Exception Handling and Strings The   global   concept   of   exception  handling is simple. The idea is to raise some  error flag every time something goes wrong.  Next, there is a system that is always on the  lookout for this error flag. Third, the previous  system calls the error handling code if the error  flag has been spotted. Program Flow The   raising   of   the   imaginary   error   flag   is   simply   called   raising   or  throwing  an error. When an error is thrown the overall system responds by  catching  the error. Surrounding a block of error-sensitive code with exception  handling is called  trying  to execute a block. One of the most powerful features of exception handling is that an error 
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 06/14/2011 for the course COMPUTER 091 taught by Professor Rajivsir during the Summer '11 term at MIT.

Page1 / 6

CS132L-Lesson1 - Lesson1 ExceptionHandling Objectives:

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online