15 lines
350 B
PHP
15 lines
350 B
PHP
<?php
|
|
|
|
/**
|
|
* Thrown instead of exit() when QDB_TESTING is enabled (PHPUnit integration tests).
|
|
*/
|
|
final class QdbHttpResponse extends Exception
|
|
{
|
|
public function __construct(
|
|
public readonly array $body,
|
|
public readonly int $status,
|
|
) {
|
|
parent::__construct(json_encode($body, JSON_THROW_ON_ERROR), $status);
|
|
}
|
|
}
|