Q&A Notes: Exceptions


  1. When should throw be used?
  2. When should try be used?
  3. When should catch be used?
  4. Write down example code of a function with a throw, then a call to that function with a wrapping try/catch.
  5. Documentation URLs for the exception family: https://cplusplus.com/reference/stdexcept/
  6. Write down example code for creating a class that inherits from an exception to create a custom exception type.

Author: Rachel Wil Sha Singh

Created: 2023-09-10 Sun 16:53

Validate