Cleanup
This commit is contained in:
@ -3,6 +3,7 @@ namespace Incoviba\Service\Venta;
|
||||
|
||||
use Incoviba\Common\Implement\Exception\EmptyResult;
|
||||
use Incoviba\Common\Implement\Repository\Factory;
|
||||
use Incoviba\Exception\ServiceAction\Read;
|
||||
use Incoviba\Repository;
|
||||
use Incoviba\Model;
|
||||
|
||||
@ -20,7 +21,11 @@ class Pie
|
||||
}
|
||||
public function getByVenta(int $venta_id): Model\Venta\Pie
|
||||
{
|
||||
return $this->process($this->pieRepository->fetchByVenta($venta_id));
|
||||
try {
|
||||
return $this->process($this->pieRepository->fetchByVenta($venta_id));
|
||||
} catch (EmptyResult $exception) {
|
||||
throw new Read(__CLASS__, $exception);
|
||||
}
|
||||
}
|
||||
|
||||
public function add(array $data): Model\Venta\Pie
|
||||
|
Reference in New Issue
Block a user