ClassBuilder.st
changeset 11893 d32064f5149a
parent 11832 e0979391bb94
child 11991 ddbadaee030f
--- a/ClassBuilder.st	Wed Sep 02 12:21:10 2009 +0200
+++ b/ClassBuilder.st	Wed Sep 02 12:24:43 2009 +0200
@@ -385,7 +385,7 @@
     ].
 
     (superClass notNil and:[realNewName = superClass name]) ifTrue:[
-        self error:'trying to create circular class definition'.
+        ClassBuildError raiseErrorString:'trying to create circular class definition'.
         ^ nil
     ].
 
@@ -402,7 +402,7 @@
     oldClass notNil ifTrue:[
         (oldClass isRealNameSpace) ifTrue:[
             (superClass == NameSpace or:[superClass isNamespace]) ifFalse:[
-                self error:'class exists as namespace'.
+                ClassBuildError raiseErrorString:'class exists as namespace'.
                 ^ nil.
             ].
             ^ oldClass
@@ -427,7 +427,7 @@
             oldClass := nil
         ] ifFalse:[
             (self checkForCircularDefinitionFrom:oldClass) ifTrue:[
-                self error:'trying to create circular class definition'.
+                ClassBuildError raiseErrorString:'trying to create circular class definition'.
                 ^ nil
             ].
 
@@ -928,7 +928,7 @@
             "/ dont allow built-in classes to be modified
 
             (oldClass notNil and:[oldClass isBuiltInClass and:[instVarChange]]) ifTrue:[
-                self error:'the layout of this class is fixed - you cannot change it'.
+                ClassBuildError raiseErrorString:'the layout of this class is fixed - you cannot change it'.
                 AbortSignal raise
             ].
 
@@ -1131,7 +1131,7 @@
 
     "/ dont allow built-in classes to be modified this way
     (oldClass notNil and:[oldClass isBuiltInClass and:[superClassChange]]) ifTrue:[
-        self error:'the inheritance of this class is fixed - you cannot change it'.
+        ClassBuildError raiseErrorString:'the inheritance of this class is fixed - you cannot change it'.
         ^ oldClass
     ].
 
@@ -1920,10 +1920,10 @@
 
     (className isSymbol not
     or:[className size == 0]) ifTrue:[
-        self error:'invalid class name (must be a nonEmpty symbol)'.
+        ClassBuildError raiseErrorString:'invalid class name (must be a nonEmpty symbol)'.
     ].
     className first isLetter ifFalse:[
-        self error:'invalid class name (must start with a letter)'.
+        ClassBuildError raiseErrorString:'invalid class name (must start with a letter)'.
     ].
 
     "Modified: / 11-08-2006 / 12:46:54 / cg"
@@ -2132,7 +2132,7 @@
     "check for invalid subclassing of UndefinedObject and SmallInteger"
     superClass notNil ifTrue:[
         superClass canBeSubclassed ifFalse:[
-            self error:('it is not possible to subclass ' , superClass name).
+            ClassBuildError raiseErrorString:('it is not possible to subclass ' , superClass name).
         ]
     ].
 !
@@ -2177,5 +2177,5 @@
 !ClassBuilder class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/ClassBuilder.st,v 1.79 2009-08-04 12:43:45 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ClassBuilder.st,v 1.80 2009-09-02 10:24:43 cg Exp $'
 ! !