care for bad copyright
authorClaus Gittinger <cg@exept.de>
Wed, 04 Oct 2006 17:29:13 +0200
changeset 10037 b0e6048fc6fe
parent 10036 51489deaf8c5
child 10038 c43f3fe7766a
care for bad copyright
SmalltalkChunkFileSourceWriter.st
--- a/SmalltalkChunkFileSourceWriter.st	Wed Oct 04 17:27:53 2006 +0200
+++ b/SmalltalkChunkFileSourceWriter.st	Wed Oct 04 17:29:13 2006 +0200
@@ -78,26 +78,19 @@
          and insert at beginning.
         "
         copyrightText := copyrightMethod comment.
-        copyrightText isEmptyOrNil ifTrue:[
+        copyrightText notEmptyOrNil ifTrue:[
             "
-             no source available - trigger an error
+             strip off the selector-line
             "
-            ClassDescription fileOutErrorSignal
-                raiseRequestWith:nonMeta
-                errorString:('no source for class ' , nonMeta name , ' available. Cannot fileOut').
-            ^ self
-        ].
-        "
-         strip off the selector-line
-        "
-        copyrightText := copyrightText asCollectionOfLines asStringCollection.
-        [copyrightText notEmpty and:[copyrightText first isEmptyOrNil]] whileTrue:[ copyrightText removeFirst ].
-        [copyrightText notEmpty and:[copyrightText last isEmptyOrNil]] whileTrue:[ copyrightText removeLast ].
-        copyrightText notEmptyOrNil ifTrue:[
-            copyrightText addFirst:'"'.
-            copyrightText addLast:'"'.
-            copyrightText := copyrightText asString.
-            outStream nextPutAllAsChunk:copyrightText.
+            copyrightText := copyrightText asCollectionOfLines asStringCollection.
+            [copyrightText notEmpty and:[copyrightText first isEmptyOrNil]] whileTrue:[ copyrightText removeFirst ].
+            [copyrightText notEmpty and:[copyrightText last isEmptyOrNil]] whileTrue:[ copyrightText removeLast ].
+            copyrightText notEmptyOrNil ifTrue:[
+                copyrightText addFirst:'"'.
+                copyrightText addLast:'"'.
+                copyrightText := copyrightText asString.
+                outStream nextPutAllAsChunk:copyrightText.
+            ].
         ].
     ].
 
@@ -226,7 +219,7 @@
 
     "Created: / 15-11-1995 / 12:53:06 / cg"
     "Modified: / 01-04-1997 / 16:01:05 / stefan"
-    "Modified: / 04-10-2006 / 17:22:44 / cg"
+    "Modified: / 04-10-2006 / 17:28:33 / cg"
 !
 
 fileOutAllDefinitionsOf:aNonMetaClass on:aStream
@@ -386,5 +379,5 @@
 !SmalltalkChunkFileSourceWriter class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/SmalltalkChunkFileSourceWriter.st,v 1.3 2006-10-04 15:27:53 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/SmalltalkChunkFileSourceWriter.st,v 1.4 2006-10-04 15:29:13 cg Exp $'
 ! !