Exceptions aren't guaranteed to have a 'message' attribute. It does have 'args', but str(ex) is probably more useful as it's likely to include the exception type.
Exceptions aren't guaranteed to have a 'message' attribute. It does have 'args', but str(ex) is probably more useful as it's likely to include the exception type.