Starting from:

$30

 SIE508 Homework 5 Exceptions               

1. Add appropriate exceptionsand exception handling to persistent      basic_backend.py and Model.py.      

 

basic_backend.py  and the Model.py (code is  attached).          

In this version,  the basic_backend.py provides a CRUD interface  

 

 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.                           
A)  Basic_backend.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?            

B)   ModelBasic needs to handle any exceptions   that basic_backend.py  might   raise and  raise exceptions  itself  around critical code blocks. 

C)  Check  for additional  critical blocks  you could find opportunities or  exception  handling.                             

More products