Time.st
changeset 6624 886265eff14c
parent 6467 f200ac48f2a8
child 6873 c70b04265d33
--- a/Time.st	Thu Jul 11 23:05:14 2002 +0200
+++ b/Time.st	Mon Jul 15 11:24:54 2002 +0200
@@ -137,11 +137,7 @@
      If no am/pm follows the time, the string is interpreted as 
      either 24 hour format or being am."
 
-    |newTime|
-
-    ErrorSignal handle:[:ex |
-        ^ exceptionBlock value
-    ] do:[
+    ^ [
         |str hour min sec|
 
         str := aStringOrStream readStream.
@@ -188,9 +184,8 @@
                 ]
             ]
         ].
-        newTime := self basicNew setHours:hour minutes:min seconds:sec
-    ].
-    ^ newTime
+        self basicNew setHours:hour minutes:min seconds:sec
+    ] on:Error do:exceptionBlock.
 
     "
      Time readFrom:'0:00'     
@@ -219,7 +214,7 @@
      Time readFrom:'0:00:00 am'  
      Time readFrom:'24:00:00 am'  
      Time readFrom:'12:00:00 pm'  
-     Time readFrom:'0:00:00 pm'   - invalid
+     Time readFrom:'0:00:00 pm' onError:'invalid'
      Time readFrom:'24:00:00 pm'  
     "
 
@@ -661,5 +656,5 @@
 !Time class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Time.st,v 1.53 2002-03-18 11:01:03 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Time.st,v 1.54 2002-07-15 09:24:11 stefan Exp $'
 ! !