#QUALITY by cg
authorClaus Gittinger <cg@exept.de>
Thu, 12 May 2016 17:48:32 +0200
changeset 3677 1fd6bb99c343
parent 3675 c7ba11759026
child 3678 393a135d1c66
#QUALITY by cg class: ApplicationModel changed: #interfaceSpecFor: better diagnose when encountering an unhandled attribute in a literalArray (was always difficult to find the origin)
ApplicationModel.st
--- a/ApplicationModel.st	Wed May 11 01:30:12 2016 +0200
+++ b/ApplicationModel.st	Thu May 12 17:48:32 2016 +0200
@@ -3511,10 +3511,19 @@
      Can be refefined in subclasses which want to provide per-instance specs."
 
     aSelectorOrSpec isSymbol ifFalse:[
-	(aSelectorOrSpec isKindOf:UISpecification) ifTrue:[^ aSelectorOrSpec].
+        (aSelectorOrSpec isKindOf:UISpecification) ifTrue:[^ aSelectorOrSpec].
     ].
-    ^ self class interfaceSpecFor:aSelectorOrSpec
-
+    UnhandledAttributeInLiteralArrayErrorSignal handle:[:ex |
+        "/ that is to support debugging - to easily find the bad spec
+        Transcript showCR:'%1 [warning]: Error in spec (%2):' withCRs 
+                                with:self class name 
+                                with:aSelectorOrSpec.
+        Transcript showCR:ex description. 
+        ex proceed.
+    ] do:[    
+        ^ self class interfaceSpecFor:aSelectorOrSpec
+    ].
+    
     "Created: / 25-01-1998 / 19:45:12 / cg"
     "Modified: / 14-01-2008 / 17:54:29 / cg"
 !