This commit is contained in:
Juan Pablo Vial
2025-03-03 14:55:57 -03:00
parent 4aa88d5164
commit ef54c36edc
6 changed files with 104 additions and 7 deletions

View File

@ -73,7 +73,7 @@ class Contract extends Ideal\Service
$state = $this->stateRepository->create(['contract_id' => $contract->id, 'date' => $date, 'type' => $type]);
$this->stateRepository->save($state);
return $this->process($contract);
} catch (Implement\Exception\EmptyResult $exception) {
} catch (PDOException $exception) {
throw new ServiceAction\Create(__CLASS__, $exception);
}
}
@ -115,7 +115,7 @@ class Contract extends Ideal\Service
$state = $this->stateRepository->create(['contract_id' => $contract->id, 'date' => $date, 'type' => $type]);
$this->stateRepository->save($state);
return $this->process($contract);
} catch (PDOException | Implement\Exception\EmptyResult $exception) {
} catch (PDOException $exception) {
throw new ServiceAction\Update(__CLASS__, $exception);
}
}