Closed mmcco closed 7 years ago
More generally, it's only worth defining new Exception classes when you expect them to be handled uniquely. I don't know enough about your code to comment on that, though.
Hi, thanks for the comments!
I tried to define Exceptions for different behaviours, but some of them have different names just for clarity. I don't have much experience with Python, so I'm sure there are various things that might not be standard. Anyway, thanks for pointing this out.
This is a minor point, but I thought it worth mentioning. It's usually best to make exceptions' strings explain their context. Namely, at the end of core_demo.py, you have a bunch of exception-catching conditions, but if their strings contained the context ('Misconfiguration: '), for example, you could use a single catch-all.
Awesome job, by the way! I was browsing the code after reading your blog post.