On Thu, 23 May 2013, commits@source.squeak.org wrote:
Nicolas Cellier uploaded a new version of Multilingual to project The Trunk: http://source.squeak.org/trunk/Multilingual-nice.160.mcz
----- Method: UTF8TextConverter class>>errorMalformedInput: (in category 'utilities') ----- errorMalformedInput: aString "Invalid UTF-8 input has been detected in the given string. Raise an error if strict conversions are enabled, otherwise allow the original string to be returned."
self strictUtf8Conversions ifTrue:[
(InvalidUTF8 new string: aString) signal.
I think using cascade is better in this case:
InvalidUTF8 new string: aString; signal
Levente
self error: 'Invalid utf8: ', aString
].
^aString!
Maybe... Except my lazyness, even better would have been a class side 'instance creation' method, which is what the construct suggests.
2013/5/24 Levente Uzonyi leves@elte.hu
On Thu, 23 May 2013, commits@source.squeak.org wrote:
Nicolas Cellier uploaded a new version of Multilingual to project The
Trunk: http://source.squeak.org/**trunk/Multilingual-nice.160.**mczhttp://source.squeak.org/trunk/Multilingual-nice.160.mcz
----- Method: UTF8TextConverter class>>errorMalformedInput: (in category 'utilities') ----- errorMalformedInput: aString "Invalid UTF-8 input has been detected in the given string. Raise an error if strict conversions are enabled, otherwise allow the original string to be returned."
self strictUtf8Conversions ifTrue:[
(InvalidUTF8 new string: aString) signal.
I think using cascade is better in this case:
InvalidUTF8 new string: aString; signal
Levente
self error: 'Invalid utf8: ', aString
]. ^aString!
squeak-dev@lists.squeakfoundation.org