L28exceptions

L28exceptions - Exceptions for safe programming Questions...

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

View Full Document Right Arrow Icon
Exceptions for safe programming
Background image of page 1

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

View Full DocumentRight Arrow Icon
Questions on Exceptions what are exceptions why are they needed? what are try-block? catch-block? What does it mean to throw or catch an exception? what is the type of an exception? what is the default exception? how is it caught? can an object be used to throw an exception? why is that useful? how can an exception be thrown inside a function and caught outside it? what are standard exceptions? What standard exceptions have we studied?
Background image of page 2
Why Exceptions exceptions are used to signal that something unusual has happened during program execution when signal is sent the control is transferred to specific place in a program designated to handle this exception throwing the exception – the event of sending a signal called catching the exception – handling it exception mechanism is for handling extraordinary situations: division by zero, array out of range do not use it for ordinary transfer of control – bad style, cryptic program
Background image of page 3

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

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/22/2010 for the course CS 23021 taught by Professor Staff during the Spring '08 term at Kent State.

Page1 / 8

L28exceptions - Exceptions for safe programming Questions...

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

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