That's it, I would change for something like
readFromString: aString | aStream newInstance | aStream := aString readString. newInstance := self readFrom: aStream. aStream atEnd ifFalse: [FormatError raise]. ^newInstance
I would propose to break this in two methods:
readFromString: aString onLeftOver: aBlock | aStream newInstance | aStream := aString readString. newInstance := self readFrom: aStream. aStream atEnd ifFalse: [aBlock value]. ^newInstance
and
readFromString: aString
^ readFromString: aString onLeftOver: [FormatError raise]
This way we can handle cases where we do not care about trailing stuff, without having to modify the string (which could be expensive)
Stef