|
From: | Paolo Bonzini |
Subject: | Re: [Help-smalltalk] Exception in the socket code |
Date: | Fri, 25 Mar 2011 13:08:34 +0100 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.7 |
On 03/25/2011 01:00 PM, Holger Hans Peter Freyther wrote:
Hi Paolo, from time to time I get the below exception. I fail to properly reproduce it with a standalone test case though. FileDescriptor)>>nextAvailable:into:startingAt: ... self isOpen ifFalse: [^available]. ^^^ just checks if the fd is>= 0 count := self fileOp: 3 with: aCollection with: position + available with: (position + n - 1 min: aCollection size). ^^^ okay an error happened here that will not throw an exception and the default fileOp:with:with:with will return nil. So maybe we should add an ifFail: [0] to it?
The correct #ifFail: would probably be to check errno.We should also look for cases where raising an exception is appropriate instead of calling the failure block.
Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |