Default error handling in Python try/except block
Even so it is useful to specify different ways of how errors will be handled in try/except block, there may be cases, when it is impossible to predict the type of the error that may happen. In order to handle errors of unknown type, except block with no specific error type needs to be used. It is a “catch all” case.
It is specified with default keyword.
Comments
Post a Comment