-
-
Notifications
You must be signed in to change notification settings - Fork 612
Closed
Labels
Description
I would like to contribute a patch for this, but I have a few questions before I can do that.
Now PHP 7 is out, fatal errors no longer need to halt test execution. It looks like appropriate place in makeCall method in in the CallCenter class
public function makeCall(Call $call)
{
try {
$filteredCall = $this->filterCall($call);
$result = $this->handleCall($filteredCall);
$filteredResult = $this->filterResult($result);
} catch (Exception $e) {
return new CallResult($call, null, $e, null);
} catch (\Throwable $e) {
// Cast \Throwable to \Exception?
$e = throwableToException($e);
return new CallResult($call, null, $e, null);
}
return $filteredResult;
}I have something along these lines working however I am not sure how to handle the cast of Throwable to Exception in the context of Behat. Symfony handles it via FatalThrowableException but to be frank I don't fully understand the constructor of that class, why is ErrorException instantiated but not assigned for example?
I would appreciate any pointers to getting a PR open (or a PR would be great too)
Reactions are currently unavailable