From 2b9d1a2593d03282ebffe5d3fd12a74f25434640 Mon Sep 17 00:00:00 2001 From: Guilherme Andrade Del Cantoni Date: Tue, 6 Nov 2018 09:47:28 -0200 Subject: [PATCH] Adicionado registro de log de exceção na construção do QRCode --- MdWsSeiRest.php | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/MdWsSeiRest.php b/MdWsSeiRest.php index eb72765..2851300 100644 --- a/MdWsSeiRest.php +++ b/MdWsSeiRest.php @@ -277,22 +277,28 @@ class MdWsSeiRest extends SeiIntegracao public function adicionarElementoMenu() { - $nomeArquivo = 'QRCODE_' - . self::NOME_MODULO - . "_" - . SessaoSEI::getInstance()->getNumIdOrgaoUsuario() - . "_" - . SessaoSEI::getInstance()->getNumIdContextoUsuario() - . "_" - . self::getVersao(); - $html = CacheSEI::getInstance()->getAtributo($nomeArquivo); - - if ($html) { - return $html; - } + try{ + $nomeArquivo = 'QRCODE_' + . self::NOME_MODULO + . "_" + . SessaoSEI::getInstance()->getNumIdOrgaoUsuario() + . "_" + . SessaoSEI::getInstance()->getNumIdContextoUsuario() + . "_" + . self::getVersao(); + $html = CacheSEI::getInstance()->getAtributo($nomeArquivo); + + if ($html) { + return $html; + } - $html = $this->montaCorpoHTMLQRCode($nomeArquivo); - CacheSEI::getInstance()->setAtributo($nomeArquivo, $html, CacheSEI::getInstance()->getNumTempo()); + $html = $this->montaCorpoHTMLQRCode($nomeArquivo); + CacheSEI::getInstance()->setAtributo($nomeArquivo, $html, CacheSEI::getInstance()->getNumTempo()); + } + catch(Exception $e){ + LogSEI::getInstance()->gravar(InfraException::inspecionar($e)); + throw $e; + } return $html; } -- libgit2 0.21.2