Skip to content

Commit

Permalink
fix: exception completa opcionalmente no consulta status para melhor …
Browse files Browse the repository at this point in the history
…analisar possíveis erros (mais completos, pois a abstração não trás o erro completo)
  • Loading branch information
robertorp committed Feb 17, 2024
1 parent dfa43f9 commit 30e2a5d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion NFe.Servicos/ServicosNFe.cs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ private INfeServico CriarServico(ServicoNFe servico, string uf = null)
/// Consulta o status do Serviço de NFe
/// </summary>
/// <returns>Retorna um objeto da classe RetornoNfeStatusServico com os dados status do serviço</returns>
public RetornoNfeStatusServico NfeStatusServico()
public RetornoNfeStatusServico NfeStatusServico(bool exceptionCompleta = false)
{
var versaoServico = ServicoNFe.NfeStatusServico.VersaoServicoParaString(_cFgServico.VersaoNfeStatusServico);

Expand Down Expand Up @@ -192,6 +192,10 @@ public RetornoNfeStatusServico NfeStatusServico()
}
catch (WebException ex)
{
if (exceptionCompleta)
{
throw;
}
throw FabricaComunicacaoException.ObterException(ServicoNFe.NfeStatusServico, ex);
}

Expand Down

0 comments on commit 30e2a5d

Please sign in to comment.