I realised I may have posted this on the wrong list. Is there anyone that can help with this one please?
---------- Forwarded message ---------- From: Otto Behrens <[email protected]> Date: Sun, Apr 19, 2015 at 10:08 AM Subject: exception handling problem when running tests in Nautilus To: [email protected] Hi, Thanks everyone for the new Pharo and all the work done. I like Spotter! I gave Pharo 4 a try today and ran into a problem with running tests in a TestCase (test class -> run tests). I just get the debugger popping up with WARequestContextNotFound. In the setUp of our test case, we call WACurrentRequestContext value, but handle the error when we do not have a context, for example: [ WACurrentRequestContext value. true ] on: WARequestContextNotFound do: [ :e | false ] This handler: "[ :e | false ]" is never called. What influences this is the exception handling in: AbstractNautilusUI >> #runTestsOfClass:notifying: Firstly, I think that it may be slighly better to call "e pass" or "e outer" in stead of "e defaultAction", as this would give another outer handler a chance to do something. The defaultAction is called when there are no more outer handlers anyway. After trying this, it did not help my cause. And I think that this is because the WACurrentRequestContext is a Notification and not an Error. I then replaced Exception with Error in the handler in AbstractNautilusUI. This seem to work. What also works is to completely remove the exception handling in AbstractNautilusUI >> #runTestsOfClass:notifying: What is a bit strange is the inconsistency in this exception handling when running a suite or an individual test. Perhaps this kind of code could be better on the TestSuite and not in the Nautilus UI? Can anyone please help? Should I be doing something else? Cheers Otto
