Use exception classes instead of class vars
authorStefan Vogel <sv@exept.de>
Wed, 21 Apr 2004 16:11:38 +0200
changeset 1446 c59e6816f4b8
parent 1445 6fbd46d7f9f0
child 1447 210f3ac37991
Use exception classes instead of class vars
CompressionStream.st
SoundStream.st
--- a/CompressionStream.st	Mon Apr 12 18:37:53 2004 +0200
+++ b/CompressionStream.st	Wed Apr 21 16:11:38 2004 +0200
@@ -441,22 +441,22 @@
     n := count.
 
     n <= 0 ifTrue:[
-	n ~~ 0 ifTrue:[
-	    "dont know how to unread ..."
-	    PositionErrorSignal raiseRequest
-	].
-	^ self
+        n ~~ 0 ifTrue:[
+            "dont know how to unread ..."
+            PositionError raiseRequest
+        ].
+        ^ self
     ].
 
     [self canReadWithoutBlocking] whileTrue:[
-	avail := readLimit - position.
+        avail := readLimit - position.
 
-	avail >= n ifTrue:[
-	    position := position + n.
-	    ^ self
-	].
-	position := readLimit := 0. "/ reset input
-	n := n - avail.
+        avail >= n ifTrue:[
+            position := position + n.
+            ^ self
+        ].
+        position := readLimit := 0. "/ reset input
+        n := n - avail.
     ].
 ! !
 
@@ -542,7 +542,7 @@
 !CompressionStream class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic2/CompressionStream.st,v 1.15 2004-03-17 16:14:44 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic2/CompressionStream.st,v 1.16 2004-04-21 14:11:38 stefan Exp $'
 ! !
 
 CompressionStream initialize!
--- a/SoundStream.st	Mon Apr 12 18:37:53 2004 +0200
+++ b/SoundStream.st	Wed Apr 21 16:11:38 2004 +0200
@@ -258,7 +258,7 @@
 
 initialize
     UnsupportedOperationSignal isNil ifTrue:[
-        UnsupportedOperationSignal := StreamErrorSignal newSignalMayProceed:true.
+        UnsupportedOperationSignal := StreamError newSignalMayProceed:true.
         UnsupportedOperationSignal nameClass:self message:#unsupportedOperationSignal.
         UnsupportedOperationSignal notifierString:'unsupported operation'.
     ]
@@ -2660,7 +2660,7 @@
 !SoundStream class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic2/SoundStream.st,v 1.63 2004-03-20 15:28:21 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic2/SoundStream.st,v 1.64 2004-04-21 14:11:36 stefan Exp $'
 ! !
 
 SoundStream initialize!