catch general Throwable for before test execution code#6929
catch general Throwable for before test execution code#6929applyACS wants to merge 1 commit intoCodeception:mainfrom
Conversation
|
I just tried throwing an Applying your change makes codeception exit with a code of 1 and it does list all the tests as failing. So the change looks ok to me, but I couldn't reproduce your issue with codeception exiting with code 0 in this case. |
|
my error was: Call to a member function foo() on null |
|
I tried it with $foo = null;
$foo->foo();in the try block and got
but still got exit code 255. I don't think this is a blocker for this PR though. |
|
I'm okay with this change, but I'm not sure it's the only place where it should be made. |
|
Not sure if it's the only place. It's the place I've had a problem with. |
We had an error in a seeder and this was not caught by codeception. No test was running but codeception return 0 so it looked like everything was fine.
This is a fix this that case.