What does it mean? A parent's exception class can catch the child's exception class?

In ths Lesson(Exception, class), it says

Since our exceptions are subclassed in this way, we can catch any of KitchenException ‘s subclasses by catching KitchenException.

Does it mean that the parent’s class also get attributes from the child’s class?

What does it mean exactly?
Thanks.

I believe it’s intended as in any subclass of KitchenException, i.e. MicrowaveException, RefrigeratorException can still be caught by the parent KitchenException. Expanding that further Exception would catch all three of those exceptions since they are all subclassed from it.

The example provided on the page mentions this.

1 Like

Thanks, this makes more sense.