Hi Davide,
I don���t think something specific to your needs exists, but you can easily build your own.
There is already for example `haltIfTest` that will halt if you���re in the dynamic extent of a test.
If you���re dealing with concurrency issues, I don���t understand how the `haltIfError` is actually helping you.
Just running the test in debug mode is not enough? => it should open a debugger when it finds an error, right?
G
Hi Noury,
You are right and reading your answer I understand I wasn't crystal clear.
I have a test scenario where sometimes a race condition occurs, so I'm not expecting any error. Which is why I'd prefer something built-in Pharo: a sort of "haltIfError" or "haltOnError" built-in command.
Is there anything like that in Pharo?
TIA
Davide
On Thursday, January 4, 2024 at 01:24:59 PM GMT+1, Noury Bouraqadi <
bouraqadi@gmail.com> wrote:
Hi Davide,
Why not use one of the following:
self should: ["message that might signal an error"] raise: Error "Replace Error with the exception you want to catch"
self shouldnt: ["message that might signal an error"] raise: Error "Replace Error with the exception you want to catch"
Hi Guys,
Sometimes I'd like to stop my test suite when an error occurs.
My raw approach is to put a self halt in the TestResult>>addError: and look at the debugger, but I'm wondering if there is a more suitable way.
Can you help me, please?
TIA
Davide