#FEATURE by cg expeccoALM_1_12 expecco_18_1_0 expecco_18_1_0_6496 expecco_18_1_0_6496_v2 expecco_18_1_0wa1
authorClaus Gittinger <cg@exept.de>
Mon, 14 May 2018 02:21:18 +0200
changeset 1048 582b3a028cbc
parent 1047 71460ee79b0f
child 1050 202d91849493
#FEATURE by cg class: MCMethodDefinition changed: #postloadOver:
MCMethodDefinition.st
--- a/MCMethodDefinition.st	Wed May 09 19:38:31 2018 +0200
+++ b/MCMethodDefinition.st	Mon May 14 02:21:18 2018 +0200
@@ -265,11 +265,15 @@
 !
 
 postloadOver: aDefinition
-	super postloadOver: aDefinition.
-	(self isInitializer
-		and: [ self actualClass isTrait not ]
-		and: [ aDefinition isNil or: [ self source ~= aDefinition source ] ]) ifTrue: [
-			self actualClass theNonMetaClass initialize ]
+        super postloadOver: aDefinition.
+        (self isInitializer
+                and: [ self actualClass isTrait not ]
+                and: [ aDefinition isNil or: [ self source ~= aDefinition source ] ]) ifTrue: [
+                        Error handle:[:ex |
+                            Dialog warn:('Error during initialization of %1\\%2' 
+                                        bindWith:self actualClass theNonMetaClass name
+                                        with:ex description)
+                        ] do:[self actualClass theNonMetaClass initialize] ]
 !
 
 scanForPreviousVersion