Fix in SmallSense::SmalltalkInferencer>>process: handle errors during inference...
authorJan Vrany <jan.vrany@fit.cvut.cz>
Fri, 21 Mar 2014 19:02:00 +0000
changeset 182 7fdc6e26f0f1
parent 181 cd22fe147eb4
child 183 cfce2733ee7e
Fix in SmallSense::SmalltalkInferencer>>process: handle errors during inference... ...and just print them on Transcript. If not handled, it will just annoy users - it's better to do nothing than open up an debugger...
SmallSense__SmalltalkInferencer.st
--- a/SmallSense__SmalltalkInferencer.st	Tue Mar 18 12:29:58 2014 +0000
+++ b/SmallSense__SmalltalkInferencer.st	Fri Mar 21 19:02:00 2014 +0000
@@ -204,13 +204,19 @@
      The tree is also stored in an instance variable, so it
      may be obtained form receiver any time by asking for #tree."
 
-    self parse. 
+    [
+        self parse. 
+    ] on: Error do:[:ex|
+        Transcript showCR: ex description.  
+        ^ self.
+    ].
     tree notNil ifTrue:[
         self infer.
     ].
     ^tree
 
     "Created: / 26-11-2011 / 12:50:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 21-03-2014 / 19:00:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !SmalltalkInferencer::Phase1 methodsFor:'initialization'!