Lecture overview -- Keyboard shortcut: 'u'  Previous page: When are errors detected? -- Keyboard shortcut: 'p'  Next page: Where are errors handled? -- 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 7 : 30
Object-oriented Programming in C#
Exception Handling
How are errors handled?

How should a run-time error be handled?

  • Ignore

    • False alarm - Naive

  • Report

    • Write a message on the screen or in a log - Helpful for subsequent correction of the source program

  • Terminate

    • Stop the program execution in a controlled an gentle way - Save data, close connections

  • Repair

    • Recover from the error in the running program - Continue normal program execution when the problem is solved