#REFACTORING by cg
authorClaus Gittinger <cg@exept.de>
Tue, 28 Jan 2020 17:19:05 +0100
changeset 4621 cf9b7c0d6fbf
parent 4620 b3fff8f79239
child 4622 d39fbcb89f9c
#REFACTORING by cg class: InstrumentingCompiler added: #correctVariable:atPosition:to: class: InstrumentingCompiler class changed: #compileMethod:
InstrumentingCompiler.st
--- a/InstrumentingCompiler.st	Tue Jan 28 16:02:31 2020 +0100
+++ b/InstrumentingCompiler.st	Tue Jan 28 17:19:05 2020 +0100
@@ -168,13 +168,20 @@
     aMethod hasPrimitiveCode ifTrue:[^ self].
     aMethod isSubclassResponsibility ifTrue:[^ self].      
     (aMethod hasAnnotation:#noCoverage) ifTrue:[^ self].      
+    aMethod isInstrumented ifTrue:[^ self].      
 
-    Class withoutUpdatingChangesDo:[
-        Class packageQuerySignal answer: aMethod package do:[
-            self 
-                compile:(aMethod source)
-                forClass:(aMethod mclass) 
-                inCategory:(aMethod category)
+    Error handle:[:ex |
+        Transcript showCR:'error instrumenting: %1' with:aMethod.
+        Transcript showCR:'    %1' with:ex description.
+        ex reject.
+    ] do:[
+        Class withoutUpdatingChangesDo:[
+            Class packageQuerySignal answer: aMethod package do:[
+                self 
+                    compile:(aMethod source)
+                    forClass:(aMethod mclass) 
+                    inCategory:(aMethod category)
+            ]
         ]
     ]
 !
@@ -484,6 +491,12 @@
     "Created: / 30-09-2011 / 12:27:47 / cg"
 ! !
 
+!InstrumentingCompiler methodsFor:'ignored error handling'!
+
+correctVariable:name atPosition:pos1 to:pos2
+    ^ #correctIt
+! !
+
 !InstrumentingCompiler methodsFor:'redefinable'!
 
 blockExecutionInfoInstance