#REFACTORING by cg
class: ImageReader
added: #fileFormatError:with:
changed: #fileFormatError:
--- a/ImageReader.st Tue Aug 29 22:37:28 2017 +0200
+++ b/ImageReader.st Tue Aug 29 23:01:06 2017 +0200
@@ -18,8 +18,8 @@
samplesPerPixel bitsPerSample colorMap mask maskPixel
dimensionCallBack dimensionHolder progressHolder imageSequence
metaData'
- classVariableNames:'ReverseBits WhiteCountTable WhiteShiftTable BlackCountTable
- LeftBits BlackShiftTable'
+ classVariableNames:'BlackCountTable BlackShiftTable LeftBits ReverseBits
+ WhiteCountTable WhiteShiftTable'
poolDictionaries:''
category:'Graphics-Images-Readers'
!
@@ -2626,9 +2626,19 @@
"report a format error - no image could be read.
The error may be proceeded, then a nil is returned (useful for image sequences as in ICNS)"
+ ^ self fileFormatError:aMessage with:nil
+
+ "Created: / 03-02-1998 / 17:50:06 / cg"
+ "Modified: / 29-08-2017 / 23:00:51 / cg"
+!
+
+fileFormatError:aMessage with:argument
+ "report a format error - no image could be read.
+ The error may be proceeded, then a nil is returned (useful for image sequences as in ICNS)"
+
|errorString|
- errorString := self class name , ' [error]: ' , aMessage.
+ errorString := self class name , ' [error]: ' , (aMessage bindWith:argument).
inStream isFileStream ifTrue:[
errorString := errorString , Character cr, '[in "' , inStream pathName , '"]'
].
@@ -2636,8 +2646,7 @@
Image badImageFormatQuerySignal raiseRequestErrorString:errorString.
^ nil
- "Created: / 03-02-1998 / 17:50:06 / cg"
- "Modified: / 26-08-2017 / 10:37:04 / cg"
+ "Created: / 29-08-2017 / 23:00:37 / cg"
! !
!ImageReader methodsFor:'i/o support'!