class: UninterpretedBytes
authorStefan Vogel <sv@exept.de>
Tue, 26 Mar 2013 18:02:41 +0100
changeset 14970 319eeed62505
parent 14969 13470ec6f8c8
child 14971 04b3466c98b7
class: UninterpretedBytes changed: #fromHexString: more info on ConversionError
UninterpretedBytes.st
--- a/UninterpretedBytes.st	Tue Mar 26 18:01:39 2013 +0100
+++ b/UninterpretedBytes.st	Tue Mar 26 18:02:41 2013 +0100
@@ -128,14 +128,14 @@
 
     sz := aString size.
     sz == 0 ifTrue:[^ self new].
-    sz odd ifTrue:[ ConversionError raiseErrorString:'invalid hex string (odd size)' ].
+    sz odd ifTrue:[ ConversionError raiseWith:aString errorString:'invalid hex string (odd size)' ].
 
     bytes := self new: sz // 2.
     s := aString readStream.
     1 to: sz // 2 do: [ :idx |
-	hi := s next digitValue.
-	lo := s next digitValue.
-	bytes at:idx put: ((hi bitShift:4) bitOr: lo)
+        hi := s next digitValue.
+        lo := s next digitValue.
+        bytes at:idx put: ((hi bitShift:4) bitOr: lo)
     ].
     ^ bytes
 
@@ -150,7 +150,7 @@
     "
     "
      Time millisecondsToRun:[
-	1000000 timesRepeat:[ ByteArray fromHexString:'1234FEFF1234FEFF1234FEFF1234FEFF' ]
+        1000000 timesRepeat:[ ByteArray fromHexString:'1234FEFF1234FEFF1234FEFF1234FEFF' ]
      ].
     "
 !
@@ -2964,9 +2964,10 @@
 !UninterpretedBytes class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/UninterpretedBytes.st,v 1.90 2012-07-19 17:36:24 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/UninterpretedBytes.st,v 1.91 2013-03-26 17:02:41 stefan Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/UninterpretedBytes.st,v 1.90 2012-07-19 17:36:24 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/UninterpretedBytes.st,v 1.91 2013-03-26 17:02:41 stefan Exp $'
 ! !
+