Description
Assignment
- Add appropriate exceptions and exception handling to persistent basic_backend.py and Model.py.
In this homework assignment, we revisit the basic_backend.py and the Model.py (code is attached). In this version, the basic_backend.py provides a CRUD interface that stores items to a file. The ModelBasic inherits from Model and currently has no exception handling, that is, it does not catch any exception that the basic_backend.py might raise.
Introduce your own, new exceptions for the Model class. It is not really necessary since Model could raise the same exceptions as basic_backend.py. However, this is an assignment to get some experience with exception writing, using and handling. Make sure, Model raises its own exceptions that convey useful error messages.
- py needs to be equipped to handle FileIO errors and do the appropriate exception handling for this code. Are there other places to add exception handling?
- ModelBasic needs to handle any exceptions that py might raise and raise exceptions itself around critical code blocks.
- Check for additional critical blocks you could find opportunities for exception .



