[Python-Dev] Raise OSError or RuntimeError in the OS module? (original) (raw)
Victor Stinner victor.stinner at haypocalc.com
Mon May 2 12:06:47 CEST 2011
- Previous message: [Python-Dev] Windows 2000 Support
- Next message: [Python-Dev] Raise OSError or RuntimeError in the OS module?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi,
I introduced recently the signal.pthread_sigmask() function (issue #8407). pthread_sigmask() (the C function) returns an error code using errno codes. I choosed to raise a RuntimeError using this error code, but I am not sure that RuntimeError is the best choice. It is more an OS error than a runtime error: should signal.pthread_sigmask() raise an OSError instead?
signal.signal() raises a RuntimeError if setting the signal handler failed. signal.siginterrupt() raises also a RuntimeError on error.
signal.setitimer() and signal.getitimer() have their own exception class: signal.ItimerError, raised on setimer() and getitimer() error.
Victor
- Previous message: [Python-Dev] Windows 2000 Support
- Next message: [Python-Dev] Raise OSError or RuntimeError in the OS module?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]