Method.st
changeset 1691 6f12a1827aec
parent 1690 0cd4bd811bb7
child 1692 96ae6de5ce43
--- a/Method.st	Fri Oct 04 15:34:56 1996 +0200
+++ b/Method.st	Fri Oct 04 15:40:47 1996 +0200
@@ -963,15 +963,7 @@
         lazy := Compiler compileLazy:false.
 
         [
-            |compiler plug|
-
-            plug := Plug new.
-            plug respondTo:#error:position:to:from:
-                 with:[:msg :p1 :p2 :who | ('error:\\' , msg) withCRs errorPrintNL].
-            plug respondTo:#correctableError:position:to:from:
-                 with:[:msg :p1 :p2 :who | ('warning:\\' , msg) withCRs errorPrintNL. false].
-            plug respondTo:#warning:position:to:from:
-                 with:[:msg :p1 :p2 :who | ('warning:\\' , msg) withCRs errorPrintNL. false].
+            |compiler|
 
             compiler := cls compilerClass.
 
@@ -985,13 +977,13 @@
                                      compile:sourceString
                                      forClass:cls
                                      inCategory:(self category)
-                                     notifying:plug
+                                     notifying:self
                                      install:false.
             ] ifFalse:[
                 temporaryMethod := compiler new
                                      compile:sourceString 
                                      in:cls 
-                                     notifying:plug 
+                                     notifying:self 
                                      ifFail:nil
             ].
         ] valueNowOrOnUnwindDo:[
@@ -1010,7 +1002,7 @@
     ^ temporaryMethod
 
     "Created: 24.10.1995 / 14:02:30 / cg"
-    "Modified: 4.10.1996 / 14:34:42 / cg"
+    "Modified: 4.10.1996 / 14:40:33 / cg"
 !
 
 readBinaryContentsFrom: stream manager: manager
@@ -1111,6 +1103,28 @@
     "Created: 16.1.1996 / 14:41:45 / cg"
 ! !
 
+!Method methodsFor:'compiler error handling'!
+
+correctableError:msg position:p1 to:p2 from:who
+    ('error:\\' , msg) withCRs errorPrintNL.
+    ^ false
+
+    "Created: 4.10.1996 / 14:40:15 / cg"
+!
+
+error:msg position:p1 to:p2 from:who
+   ('error:\\' , msg) withCRs errorPrintNL
+
+    "Created: 4.10.1996 / 14:39:56 / cg"
+!
+
+warning:msg position:p1 to:p2 from:who
+    ('warning:\\' , msg) withCRs errorPrintNL.
+    ^ false
+
+    "Created: 4.10.1996 / 14:40:21 / cg"
+! !
+
 !Method methodsFor:'copying'!
 
 copy
@@ -2153,6 +2167,6 @@
 !Method  class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Method.st,v 1.96 1996-10-04 13:34:56 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Method.st,v 1.97 1996-10-04 13:40:47 cg Exp $'
 ! !
 Method initialize!