How do I find what kind of exception is thrown.

Cameron Simpson cs at cskk.id.au
Tue Sep 5 05:49:51 EDT 2017


On 05Sep2017 19:44, Cameron Simpson <cs at cskk.id.au> wrote:
>Almost anything which says "Errno ..." is almost always an OSError (or an 
>IOError as I found the other day). I try to be quite picky about these. So for 
>example:

Oh yes, and on a UNIX host such as Solaris the command "man 2 intro" will 
normally show you the intro to section 2 (system calls) and include a listing 
of all the errno values and their meanings.

You can probably deduce the system call from the python stack trace, so if it 
is, say, read, then "man 2 read" should include the relevant error codes and 
their cuasing circumstances.

Cheers,
Cameron Simpson <cs at cskk.id.au> (formerly cs at zip.com.au)



More information about the Python-list mailing list