python try catch print error type