Don’t accidentally catch exceptions

It is commonly known that catching broad exceptions, such as Exception in a try...except block leads to issues around catching exceptions that should not have been caught and then are not handled correctly in the except block. A related issue is encapsulating too much code in a try...except block which can lead to catching exceptions on unexpected lines of code. This post provides an example where an except block unexpectedly catches an exception and gives an example for how to avoid the issue.

Continue reading “Don’t accidentally catch exceptions”

Help your Users fix your Errors

Have you ever encountered an error when using a package and then gone to Google to find out how to solve the error only not to find any clear answers? Wouldn’t you have preferred to go directly to documentation that tells you exactly what went wrong and how to resolve that error? A lot of us can tell similar stories, especially when we try something new. I have also abandoned an otherwise promising package after encountering an error that wasn’t clear or when I didn’t know how to solve the error.

Continue reading “Help your Users fix your Errors”