ExternalStream.st
branchjv
changeset 18071 009cf668b0ed
parent 18070 d262e3aecaca
parent 15494 353aa0894d7d
child 18075 bd252c0beac9
--- a/ExternalStream.st	Mon Jul 01 22:14:20 2013 +0100
+++ b/ExternalStream.st	Tue Jul 09 22:51:30 2013 +0100
@@ -2456,19 +2456,20 @@
 
     "{ Pragma: +optSpace }"
 
-    |exClass|
-
-    exClass := (errorNumber == (OperatingSystem errorNumberFor:#ERROR_FILE_NOT_FOUND))
-	ifTrue:[ FileDoesNotExistException ]
-	ifFalse:[ OpenError ].
+    |exClass errorSymbol|
+
+    errorSymbol := OperatingSystem errorSymbolForNumber:errorNumber.
+    exClass := (errorSymbol == #ERROR_FILE_NOT_FOUND or:[errorSymbol == #ENOENT])
+        ifTrue:[ FileDoesNotExistException ]
+        ifFalse:[ OpenError ].
 
     ^ exClass newException
-	errorCode:errorNumber;
-	"/ cg: initialized lazyly - see #description in OpenError
-	"/ errorString:(' : ' , (OperatingSystem errorTextForNumber:errorNumber));
-	parameter:self;
-	raiseRequest
-	"/ in:thisContext sender
+        errorCode:errorNumber;
+        "/ cg: initialized lazyly - see #description in OpenError
+        "/ errorString:(' : ' , (OperatingSystem errorTextForNumber:errorNumber));
+        parameter:self;
+        raiseRequest
+        "/ in:thisContext sender
 
     "Modified: / 09-09-2011 / 07:22:49 / cg"
 !
@@ -2501,6 +2502,14 @@
 
 !ExternalStream methodsFor:'finalization'!
 
+executor
+    "return a copy for finalization-registration;
+     since all we need at finalization time is the fileDescriptor,
+     a cheaper copy is possible."
+
+    ^ self class basicNew setAccessor:handleType to:handle
+!
+
 finalizationLobby
     "answer the registry used for finalization.
      ExternalStreams have their own Registry"
@@ -2514,16 +2523,6 @@
     self closeFile
 ! !
 
-!ExternalStream methodsFor:'instance release'!
-
-executor
-    "return a copy for finalization-registration;
-     since all we need at finalization time is the fileDescriptor,
-     a cheaper copy is possible."
-
-    ^ self class basicNew setAccessor:handleType to:handle
-! !
-
 !ExternalStream methodsFor:'line reading/writing'!
 
 nextLine
@@ -3913,6 +3912,7 @@
 !
 
 nextWord
+    <resource: #obsolete>
     "in text-mode:
 	 read the alphaNumeric next word (i.e. up to non letter-or-digit).
 	 return a string containing those characters.
@@ -4636,7 +4636,7 @@
 !
 
 isBlocking
-    "return true, if O_NONBLOCK is NOT set in the fileDescriptor (propably UNIX specific)"
+    "return true, if O_NONBLOCK is NOT set in the fileDescriptor (probably UNIX specific)"
 
     handle isNil ifTrue:[^ self errorNotOpen].
     ^ OperatingSystem isBlockingOn:self fileDescriptor
@@ -5762,11 +5762,11 @@
 !ExternalStream class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/ExternalStream.st,v 1.365 2013-06-26 11:04:06 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ExternalStream.st,v 1.370 2013-07-08 22:33:56 stefan Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/ExternalStream.st,v 1.365 2013-06-26 11:04:06 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ExternalStream.st,v 1.370 2013-07-08 22:33:56 stefan Exp $'
 ! !