Commit 2b9d1a2593d03282ebffe5d3fd12a74f25434640
1 parent
c31a739e
Exists in
desenv
Adicionado registro de log de exceção na construção do QRCode
Showing
1 changed file
with
21 additions
and
15 deletions
Show diff stats
MdWsSeiRest.php
... | ... | @@ -277,22 +277,28 @@ class MdWsSeiRest extends SeiIntegracao |
277 | 277 | |
278 | 278 | public function adicionarElementoMenu() |
279 | 279 | { |
280 | - $nomeArquivo = 'QRCODE_' | |
281 | - . self::NOME_MODULO | |
282 | - . "_" | |
283 | - . SessaoSEI::getInstance()->getNumIdOrgaoUsuario() | |
284 | - . "_" | |
285 | - . SessaoSEI::getInstance()->getNumIdContextoUsuario() | |
286 | - . "_" | |
287 | - . self::getVersao(); | |
288 | - $html = CacheSEI::getInstance()->getAtributo($nomeArquivo); | |
289 | - | |
290 | - if ($html) { | |
291 | - return $html; | |
292 | - } | |
280 | + try{ | |
281 | + $nomeArquivo = 'QRCODE_' | |
282 | + . self::NOME_MODULO | |
283 | + . "_" | |
284 | + . SessaoSEI::getInstance()->getNumIdOrgaoUsuario() | |
285 | + . "_" | |
286 | + . SessaoSEI::getInstance()->getNumIdContextoUsuario() | |
287 | + . "_" | |
288 | + . self::getVersao(); | |
289 | + $html = CacheSEI::getInstance()->getAtributo($nomeArquivo); | |
290 | + | |
291 | + if ($html) { | |
292 | + return $html; | |
293 | + } | |
293 | 294 | |
294 | - $html = $this->montaCorpoHTMLQRCode($nomeArquivo); | |
295 | - CacheSEI::getInstance()->setAtributo($nomeArquivo, $html, CacheSEI::getInstance()->getNumTempo()); | |
295 | + $html = $this->montaCorpoHTMLQRCode($nomeArquivo); | |
296 | + CacheSEI::getInstance()->setAtributo($nomeArquivo, $html, CacheSEI::getInstance()->getNumTempo()); | |
297 | + } | |
298 | + catch(Exception $e){ | |
299 | + LogSEI::getInstance()->gravar(InfraException::inspecionar($e)); | |
300 | + throw $e; | |
301 | + } | |
296 | 302 | |
297 | 303 | return $html; |
298 | 304 | } | ... | ... |