STFormRdr.st
changeset 461 bacef118f54a
parent 400 b40294e3fee0
child 554 514e020465c7
--- a/STFormRdr.st	Thu Feb 27 12:05:52 1997 +0100
+++ b/STFormRdr.st	Thu Feb 27 12:50:58 1997 +0100
@@ -128,14 +128,22 @@
      This is obsolete - use the XBMReader directly."
 
     (self class canRepresent:image) ifFalse:[
-        self error:'can only save Depth1Images'.
-        ^ nil.
+        ^ Image cannotRepresentImageSignal 
+            raiseWith:image
+            errorString:('ST80Form format only supports monochrome images').
+    ].
+
+    image mask notNil ifTrue:[
+        Image informationLostQuerySignal
+            raiseWith:image
+            errorString:('ST80Form format does not support an imageMask').
     ].
 
     outStream := FileStream newFileNamed:aFileName.
     outStream isNil ifTrue:[
-        'create error' printNewline. 
-        ^ nil
+        ^ Image fileCreationErrorSignal 
+            raiseWith:image
+            errorString:('file creation error: ' , aFileName asString).
     ].
 
     width := image width.
@@ -156,11 +164,13 @@
     outStream close
 
     "ST80FormReader save:(Image fromFile:'bitmaps/SBrowser.xbm') onFile:'test.form'"
+
+    "Modified: 27.2.1997 / 12:46:00 / cg"
 ! !
 
 !ST80FormReader class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/Attic/STFormRdr.st,v 1.16 1997-02-01 14:09:53 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/Attic/STFormRdr.st,v 1.17 1997-02-27 11:50:58 cg Exp $'
 ! !
 ST80FormReader initialize!