Lecture overview -- Keyboard shortcut: 'u'  Previous page: What is an error? -- Keyboard shortcut: 'p'  Next page: Examples of normal and exceptional aspects -- Keyboard shortcut: 'n'  Lecture notes - all slides and notes together  slide -- Keyboard shortcut: 't'  Textbook -- Keyboard shortcut: 'v'  Help page about these notes  Alphabetic index  Course home  Page 4 : 30
Object-oriented Programming in C#
Exception Handling
What is normal? What is exceptional?

It is useful to draw the border between normal program aspects and exceptional program aspects

  • Normal program aspects

    • Situations anticipated and dealt with in the conventional program flow

    • Programmed with use of selective and iterative control structures

  • Exceptional program aspects

    • Situations anticipated, but not dealt with "in normal ways" by the programmer

      • Leads to an exception

      • Recoverable via exception handling. Or non-recoverable

    • Situations not anticipated by the programmer

      • Leads to an exception

      • Recoverable via exception handling. Or non-recoverable

    • Problems beyond the control of the program