Object.st
branchjv
changeset 19812 0866264d6eed
parent 19811 65fec19facb0
parent 19802 d7d4c355736e
child 19863 513bd7237fe7
--- a/Object.st	Thu May 12 09:30:28 2016 +0200
+++ b/Object.st	Fri May 13 20:17:32 2016 +0200
@@ -15,18 +15,18 @@
 
 nil subclass:#Object
 	instanceVariableNames:''
-	classVariableNames:'ErrorSignal HaltSignal MessageNotUnderstoodSignal
-		UserInterruptSignal RecursionInterruptSignal
-		SubscriptOutOfBoundsSignal IndexNotFoundSignal
-		NonIntegerIndexSignal NotFoundSignal KeyNotFoundSignal
-		ElementOutOfBoundsSignal UserNotificationSignal InformationSignal
-		WarningSignal PrimitiveFailureSignal DeepCopyErrorSignal
-		AbortSignal ErrorRecursion Dependencies InfoPrinting
-		ActivityNotificationSignal InternalErrorSignal
-		NonWeakDependencies SynchronizationSemaphores ObjectAttributes
-		ObjectAttributesAccessLock OSSignalInterruptSignal
-		FinalizationLobby RecursiveStoreStringSignal AbortAllSignal
-		EnabledBreakPoints DebuggerHooks'
+	classVariableNames:'AbortAllSignal AbortSignal ActivityNotificationSignal
+		DebuggerHooks DeepCopyErrorSignal Dependencies
+		ElementOutOfBoundsSignal EnabledBreakPoints ErrorRecursion
+		ErrorSignal FinalizationLobby HaltSignal IndexNotFoundSignal
+		InfoPrinting InformationSignal InternalErrorSignal
+		KeyNotFoundSignal MessageNotUnderstoodSignal
+		NonIntegerIndexSignal NonWeakDependencies NotFoundSignal
+		OSSignalInterruptSignal ObjectAttributes
+		ObjectAttributesAccessLock PrimitiveFailureSignal
+		RecursionInterruptSignal RecursiveStoreStringSignal
+		SubscriptOutOfBoundsSignal SynchronizationSemaphores
+		UserInterruptSignal UserNotificationSignal WarningSignal'
 	poolDictionaries:''
 	category:'Kernel-Objects'
 !
@@ -256,6 +256,7 @@
     "Modified: / 4.8.1999 / 08:54:06 / stefan"
 ! !
 
+
 !Object class methodsFor:'Compatibility-ST80'!
 
 rootError
@@ -494,6 +495,7 @@
     InfoPrinting := aBoolean
 ! !
 
+
 !Object class methodsFor:'queries'!
 
 isAbstract
@@ -516,6 +518,8 @@
 ! !
 
 
+
+
 !Object methodsFor:'Compatibility-Dolphin'!
 
 stbFixup: anSTBInFiler at: newObjectIndex
@@ -691,6 +695,7 @@
     "
 ! !
 
+
 !Object methodsFor:'accessing'!
 
 _at:index
@@ -1753,6 +1758,8 @@
     "
 ! !
 
+
+
 !Object methodsFor:'attributes access'!
 
 objectAttributeAt:attributeKey
@@ -1875,6 +1882,7 @@
 ! !
 
 
+
 !Object methodsFor:'change & update'!
 
 broadcast:aSelectorSymbol
@@ -2055,6 +2063,7 @@
     ^ aBlock ensure:[ self addDependent:someone ]
 ! !
 
+
 !Object methodsFor:'comparing'!
 
 = anObject
@@ -4036,28 +4045,37 @@
     "read my attributes from aSpecArray.
      Recursively decodes arguments."
 
-    |sel litVal val
+    |sel litVal val msg ex
      stop   "{ Class:SmallInteger }" |
 
     stop := aSpecArray size.
 
     2 to:stop by:2 do:[:i|
-	sel := aSpecArray at:i.
-	litVal := aSpecArray at:i + 1.
-
-	(self respondsTo:sel) ifTrue:[
-	    val := litVal decodeAsLiteralArray.
-	    self perform:sel with:val
-	] ifFalse:[
-	    Transcript show:self class name; show:': unhandled literalArrayEncoding attribute: '.
-	    Transcript showCR:sel.
-
-	    "/ thats a debug halt,
-	    "/ it should probably be removed (to simply ignore unhandled attributes)...
-	    "/ for now, it is left in, in order to easily find incompatibilities between
-	    "/ VW and ST/X.
-	    self breakPoint:#cg.
-	]
+        sel := aSpecArray at:i.
+        litVal := aSpecArray at:i + 1.
+
+        (self respondsTo:sel) ifTrue:[
+            val := litVal decodeAsLiteralArray.
+            self perform:sel with:val
+        ] ifFalse:[
+            "/ that's a debug halt,
+            "/ it should probably be removed (to simply ignore unhandled attributes)...
+            "/ for now, it is left in, in order to easily find incompatibilities between
+            "/ VW and ST/X.
+            self breakPoint:#cg.
+
+            msg := '%1: unhandled literalArrayEncoding attribute:'
+                        bindWith:self class name
+                        with:sel.
+            UnhandledAttributeInLiteralArrayErrorSignal isHandled ifTrue:[
+                ex := UnhandledAttributeInLiteralArrayErrorSignal new.
+                ex badLiteralArray:self.
+                ex parameter:sel.
+                ex notify:msg.
+            ] ifFalse:[
+                msg infoPrintCR.
+            ].
+        ]
     ]
 !
 
@@ -7985,6 +8003,7 @@
     ^ self
 ! !
 
+
 !Object methodsFor:'secure message sending'!
 
 ?:selector
@@ -8590,6 +8609,7 @@
     "
 ! !
 
+
 !Object methodsFor:'synchronized evaluation'!
 
 freeSynchronizationSemaphore
@@ -10354,6 +10374,9 @@
     ^ aVisitor visitObject:self with:aParameter
 ! !
 
+
+
+
 !Object class methodsFor:'documentation'!
 
 version