15. HC15 ‐ Haskell Chapter 15 Practical Tasks: Handling‐Errors - wimsio/universities GitHub Wiki

  1. -- HC15T1: Handle exceptions in a program that reads a file and calculates velocity based on user input.
  2. -- HC15T2: Implement a basic self-driving AI car system that reacts to traffic light colors.
  3. -- HC15T3: Define and throw a custom exception for traffic light errors.
  4. -- HC15T4: Use a handler function to catch and handle traffic light exceptions.
  5. -- HC15T5: Write a safe division function using the Maybe type to avoid divide-by-zero errors.
  6. -- HC15T6: Use readMaybe to parse user input safely and avoid runtime errors during input parsing.
  7. -- HC15T7: Implement a program that calculates velocity using optional values and handles parsing errors.
  8. -- HC15T8: Define a function using the Either type to provide detailed error messages for division.
  9. -- HC15T9: Use the try function to catch file IO exceptions and handle them gracefully.
  10. -- HC15T10: Create a velocity program that uses both Either and IO exceptions to demonstrate hybrid error handling.

Finished. Congratulations! Get your progress token here