Exception Handling
- slide 10 : 30
Exception Handling Approaches
Printing error messages
Console.Out.WriteLine(...)
or
Console.Error.WriteLine(...)
Error messages on standard output are - in general - a bad idea
Use of the Console class for redirection of the error stream
Returning error codes
Like in many C programs
In conflict with a functional programming style, where we need to return data
Set global error status variables
Almost never attractive
Raise and handle exceptions
A special language mechanism to raise an error
Rules for propagation of errors
Special language mechanisms for handling of errors