ByteCodeCompiler.st
changeset 3532 cf71c91f5b7e
parent 3531 94f9fcb3672f
child 3564 7e6207c98120
--- a/ByteCodeCompiler.st	Thu Nov 20 00:24:10 2014 +0100
+++ b/ByteCodeCompiler.st	Fri Nov 21 15:03:06 2014 +0100
@@ -2949,6 +2949,19 @@
 compile:aStringArg forClass:aClassArg inCategory:cat notifying:aRequestor
                  install:install skipIfSame:skipIfSame silent:silent foldConstants:fold
 
+    aRequestor notNil ifTrue:[
+        ^ self
+            compile:aStringArg 
+            forClass:aClassArg 
+            inCategory:cat 
+            notifying:aRequestor
+            install:install 
+            skipIfSame:skipIfSame 
+            silent:silent 
+            foldConstants:fold
+            ifFail:nil
+    ].
+
     ^ self
         compile:aStringArg 
         forClass:aClassArg 
@@ -2958,7 +2971,16 @@
         skipIfSame:skipIfSame 
         silent:silent 
         foldConstants:fold
-        ifFail:[ ParseError raiseRequestErrorString:'compilation failed'. #Error ]
+        ifFail:[:exOrNil |
+                 exOrNil notNil ifTrue:[
+                    ParseError new
+                        errorMessage:(exOrNil errorMessage) startPosition:(exOrNil startPosition) endPosition:(exOrNil endPosition);
+                        parameter:exOrNil parameter;
+                        lineNumber:exOrNil lineNumber;
+                        raiseRequest.
+                 ].
+                 ParseError raiseRequestErrorString:'compilation failed'. #Error 
+        ]
 
     "Modified: / 18-01-2011 / 11:35:21 / cg"
 !
@@ -3008,7 +3030,7 @@
                 ex reject
             ].
             self showErrorMessageForClass:aClass.
-            ^ failBlock value.
+            ^ failBlock valueWithOptionalArgument:ex.
         ] do:[
             "create a compiler, let it parse and create the parsetree"
 
@@ -3618,11 +3640,11 @@
 !ByteCodeCompiler class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libcomp/ByteCodeCompiler.st,v 1.289 2014-11-19 23:24:10 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/ByteCodeCompiler.st,v 1.290 2014-11-21 14:03:06 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libcomp/ByteCodeCompiler.st,v 1.289 2014-11-19 23:24:10 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/ByteCodeCompiler.st,v 1.290 2014-11-21 14:03:06 cg Exp $'
 !
 
 version_SVN