yiisoft / yii-runner-http

Yii HTTP Runner
https://www.yiiframework.com/
BSD 3-Clause "New" or "Revised" License
8 stars 4 forks source link

Runner don't render error body if throw exception after `ob_start()` #55

Closed vjik closed 3 months ago

vjik commented 1 year ago

In runner:

 try {
    // ...
    // Here response stream: `ob_start(); throw Exception()`
    $this->emit($request, $response);
} catch (Throwable $throwable) {
    $handler = new ThrowableHandler($throwable);
    /**
     * @var ResponseInterface
     * @psalm-suppress MixedMethodCall
     */
    $response = $container
        ->get(ErrorCatcher::class)
        ->process($request, $handler);
    $this->emit($request, $response);
}
vjik commented 3 months ago

It is no longer actual. Failed to reproduce.