September 2016
Intermediate to advanced
454 pages
9h 23m
English
Identify any code that can benefit from exception handling. For example, create a new HutError exception, and use it to raise errors related to the Hut class. Here is a cheat sheet:

Instead of using error_dict, you can also create subclasses, such as:
class HutNumberGreaterThanFiveError(HutError): pass class NegativeHutNumberError(HutError): pass
Read now
Unlock full access