Socket exceptions aren't in the standard exception hierarchy (M2Crypto issue)

John Nagle nagle at animats.com
Fri Apr 27 02:21:49 EDT 2007


    On a related note, M2Crypto's exceptions are direct children
of Exception.  If we add NetworkError, there will be a better
place to put them.

    Currently, you have to catch, at least,
	
	M2Crypto.SSL.Checker.SSLVerificationError
	M2Crypto.SSL.SSLError

both of which can be raised by socket operations if
M2Crypto is installed.   I'm not sure what errors the
stock SSL module raises.

(I'm running stress tests on a dedicated machine in a colocation
facility.  It's examining 11,000 known spam and malware sites right
now.  This exercises the error handling, forcing many unusual cases
and logging the problems.  That's why I'm discovering all these library
issues.)

					John Nagle

Steve Holden wrote:
> John Nagle wrote:
> 
>> Steve Holden wrote:
>>
>>> John Nagle wrote:
>>>
>>>> Steve Holden wrote:
>>>>
>>>>> John Nagle wrote:
>>>>> [socket.error bug report]
>>
>>
>>> All these notes should be included in the bug report, as I suspect 
>>> the module would benefit from additional clarity. 
>>
>>
>>      Done.  See
>>
>> [ 1706815 ] socket.error exceptions not subclass of StandardError
>>
>> Also see
>>
>> [ 805194 ] Inappropriate error received using socket timeout
>> [ 1019808 ] wrong socket error returned
>> [ 1571878 ] Improvements to socket module exceptions
>> [ 708927 ] socket timeouts produce wrong errors in win32
>>
>> for related but not identical problems in that area.
>>
> Thanks. At least this is less likely to be overlooked now.
> 
> regards
>  Steve



More information about the Python-list mailing list