EmptyResult ahora puede llevar los datos.
This commit is contained in:
@ -6,10 +6,15 @@ use Throwable;
|
||||
|
||||
class EmptyResult extends Exception
|
||||
{
|
||||
public function __construct(public string $query, ?Throwable $previous = null)
|
||||
public function __construct(public string $query, ?Throwable $previous = null, protected ?array $data = null)
|
||||
{
|
||||
$message = "Empty results for {$query}";
|
||||
$code = 700;
|
||||
parent::__construct($message, $code, $previous);
|
||||
}
|
||||
|
||||
public function getData(): ?array
|
||||
{
|
||||
return $this->data;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user