Throw Read
This commit is contained in:
@ -16,9 +16,18 @@ class Unidad
|
||||
protected Precio $precioService
|
||||
) {}
|
||||
|
||||
/**
|
||||
* @param int $unidad_id
|
||||
* @return Model\Venta\Unidad
|
||||
* @throws Read
|
||||
*/
|
||||
public function getById(int $unidad_id): Model\Venta\Unidad
|
||||
{
|
||||
return $this->process($this->unidadRepository->fetchById($unidad_id));
|
||||
try {
|
||||
return $this->process($this->unidadRepository->fetchById($unidad_id));
|
||||
} catch (EmptyResult $exception) {
|
||||
throw new Read(__CLASS__, $exception);
|
||||
}
|
||||
}
|
||||
public function getByVenta(int $venta_id): array
|
||||
{
|
||||
|
Reference in New Issue
Block a user