Commit 513534ccbbad8c5eb8379c6e6ac9523b35123aea
1 parent
4d57b5ae
Exists in
master
and in
21 other branches
Ajustes de erros no agendamento
Showing
1 changed file
with
5 additions
and
1 deletions
Show diff stats
rn/PENAgendamentoRN.php
@@ -269,7 +269,11 @@ class PENAgendamentoRN extends InfraRN { | @@ -269,7 +269,11 @@ class PENAgendamentoRN extends InfraRN { | ||
269 | $objBD = new PenHipoteseLegalBD($this->inicializarObjInfraIBanco()); | 269 | $objBD = new PenHipoteseLegalBD($this->inicializarObjInfraIBanco()); |
270 | $processoEletronicoRN = new ProcessoEletronicoRN(); | 270 | $processoEletronicoRN = new ProcessoEletronicoRN(); |
271 | $hipotesesPen = $processoEletronicoRN->consultarHipotesesLegais(); | 271 | $hipotesesPen = $processoEletronicoRN->consultarHipotesesLegais(); |
272 | - | 272 | + |
273 | + if (empty($hipotesesPen)) { | ||
274 | + throw new InfraException('Não foi possível obter as hipóteses legais dos serviços de integração.'); | ||
275 | + } | ||
276 | + | ||
273 | //Para cada hip?tese vinda do PEN ser? verificado a existencia. | 277 | //Para cada hip?tese vinda do PEN ser? verificado a existencia. |
274 | foreach ($hipotesesPen->hipotesesLegais->hipotese as $hipotese) { | 278 | foreach ($hipotesesPen->hipotesesLegais->hipotese as $hipotese) { |
275 | 279 |