Login  Register

Re: Exception converting aString to Time

Posted by GLASS mailing list on May 06, 2019; 7:27pm
URL: https://forum.world.st/Exception-converting-aString-to-Time-tp5098910p5098951.html

As I suspected, there is the potential for breaking existing code as Pharo3.0 only produced an error for `~~~`:

{
    Time fromString: '01256asd'.
    Time fromString: '0125asd'.
    Time fromString: '~~~'.
    Time fromString: '112'.
    Time fromString: '1100'
}
Pharo 3.0:                                  an Array(8:00 am 5:00 am ERROR 4:00 pm 8:00 pm)

I made proposed changes to GemStone (Time class>>readFrom:) where the code produces errors for the first three cases:

GemStone 3.4.3 (with my proposed patch):    anArray( ERROR, ERROR, ERROR 16:00:00, 20:00:00)
I think that it is reasonble to fail in the first three cases, but I am concerned that existing code may depend upon the first two cases running without error and perhaps even the third case ... I would like to hear opinions from a few more folks before pushing my changes to master ...

Dale

On 5/5/19 10:53 AM, BrunoBB via Glass wrote:
Hi,

There are more "strange" results in Time>>fromString: method. On GS 3.4.1
this method belong to Monticello package.

Time fromString: '01256asd'. "08:00:00"
Time fromString: '0125asd'. "05:00:00"
Time fromString: '~~~'. "00:00:00"
Time fromString: '112'.  "16:00:00"
Time fromString: '1100'. "20:00:00"

regards,
bruno



--
Sent from: http://forum.world.st/GLASS-f1460844.html
_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass