Skip to content

Commit 01bffd5

Browse files
author
lucaslioli
committed
Personalizada mensagem de erro. [Debug no servidor]
1 parent 32a80ea commit 01bffd5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

app/Nota.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@ public static function store_nfce($key)
282282
}
283283

284284
try {
285+
285286
$nota = Nota::create([
286287
'user_id' => 1,
287288
'estabelecimento_id' => $estabelecimento->id,
@@ -290,8 +291,8 @@ public static function store_nfce($key)
290291
'data_emissao' => $data->nfce->data_emissao,
291292
'hora_emissao' => $data->nfce->hora_emissao
292293
]);
293-
} catch (\Illuminate\Database\QueryException $e) {
294-
echo "<br/>Falha ao cadastrar nota";
294+
} catch (Exception $e) {
295+
echo "<br/>Falha ao cadastrar nota: ".$e;
295296
$ERROS++;
296297
}
297298

0 commit comments

Comments
 (0)