Skip to content

Commit c5e1f4f

Browse files
Melhorias exception
1 parent cbc2fba commit c5e1f4f

16 files changed

+21
-18
lines changed

src/main/java/br/com/swconsultoria/nfe/Assinar.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ private static String assinaDocNFe(ConfiguracoesNfe config, String xml, Assinatu
8181
| InvalidAlgorithmParameterException | KeyStoreException | UnrecoverableEntryException
8282
| CertificadoException | MarshalException
8383
| XMLSignatureException e) {
84-
throw new NfeException("Erro ao Assinar Nfe" + e.getMessage());
84+
throw new NfeException("Erro ao Assinar Nfe" + e.getMessage(),e);
8585
}
8686
}
8787

src/main/java/br/com/swconsultoria/nfe/AtorInteressado.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ static TRetEnvEvento eventoAtorInteressado(ConfiguracoesNfe config, TEnvEvento e
2929
return XmlNfeUtil.xmlToObject(xml, TRetEnvEvento.class);
3030

3131
} catch (JAXBException e) {
32-
throw new NfeException(e.getMessage());
32+
throw new NfeException(e.getMessage(),e);
3333
}
3434

3535
}

src/main/java/br/com/swconsultoria/nfe/Cancelar.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ static TRetEnvEvento eventoCancelamento(ConfiguracoesNfe config, TEnvEvento envi
2929
return XmlNfeUtil.xmlToObject(xml, TRetEnvEvento.class);
3030

3131
} catch (JAXBException e) {
32-
throw new NfeException(e.getMessage());
32+
throw new NfeException(e.getMessage(),e);
3333
}
3434

3535
}
@@ -48,7 +48,7 @@ static br.com.swconsultoria.nfe.schema.envEventoCancSubst.TRetEnvEvento eventoCa
4848
return XmlNfeUtil.xmlToObject(xml, br.com.swconsultoria.nfe.schema.envEventoCancSubst.TRetEnvEvento.class);
4949

5050
} catch (JAXBException e) {
51-
throw new NfeException(e.getMessage());
51+
throw new NfeException(e.getMessage(),e);
5252
}
5353

5454
}

src/main/java/br/com/swconsultoria/nfe/CartaCorrecao.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ static TRetEnvEvento eventoCCe(ConfiguracoesNfe config, TEnvEvento enviEvento, b
2929
return XmlNfeUtil.xmlToObject(xml, TRetEnvEvento.class);
3030

3131
} catch (JAXBException e) {
32-
throw new NfeException(e.getMessage());
32+
throw new NfeException(e.getMessage(),e);
3333
}
3434

3535
}

src/main/java/br/com/swconsultoria/nfe/ConsultaCadastro.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ static TRetConsCad consultaCadastro(ConfiguracoesNfe config, PessoaEnum tipoPess
128128
}
129129

130130
} catch (RemoteException | XMLStreamException | JAXBException e) {
131-
throw new NfeException(e.getMessage());
131+
throw new NfeException(e.getMessage(),e);
132132
}
133133

134134
}

src/main/java/br/com/swconsultoria/nfe/ConsultaRecibo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ static TRetConsReciNFe reciboNfe(ConfiguracoesNfe config, String recibo, Documen
7272
return XmlNfeUtil.xmlToObject(result.getExtraElement().toString(), TRetConsReciNFe.class);
7373

7474
} catch (RemoteException | XMLStreamException | JAXBException e) {
75-
throw new NfeException(e.getMessage());
75+
throw new NfeException(e.getMessage(),e);
7676
}
7777

7878
}

src/main/java/br/com/swconsultoria/nfe/ConsultaXml.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77
import br.com.swconsultoria.nfe.exception.NfeException;
88
import br.com.swconsultoria.nfe.schema_4.consSitNFe.TConsSitNFe;
99
import br.com.swconsultoria.nfe.schema_4.retConsSitNFe.TRetConsSitNFe;
10-
import br.com.swconsultoria.nfe.util.*;
10+
import br.com.swconsultoria.nfe.util.ConstantesUtil;
11+
import br.com.swconsultoria.nfe.util.ObjetoUtil;
12+
import br.com.swconsultoria.nfe.util.WebServiceUtil;
13+
import br.com.swconsultoria.nfe.util.XmlNfeUtil;
1114
import br.com.swconsultoria.nfe.wsdl.NFeConsultaProtocolo.NFeConsultaProtocolo4Stub;
1215
import lombok.extern.java.Log;
1316
import org.apache.axiom.om.OMElement;
@@ -87,7 +90,7 @@ static TRetConsSitNFe consultaXml(ConfiguracoesNfe config, String chave, Documen
8790
}
8891

8992
} catch (RemoteException | XMLStreamException | JAXBException e) {
90-
throw new NfeException(e.getMessage());
93+
throw new NfeException(e.getMessage(),e);
9194
}
9295

9396
}

src/main/java/br/com/swconsultoria/nfe/DistribuicaoDFe.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ static RetDistDFeInt consultaNfe(ConfiguracoesNfe config, PessoaEnum tipoPessoa,
101101
RetDistDFeInt.class);
102102

103103
} catch (RemoteException | XMLStreamException | JAXBException e) {
104-
throw new NfeException(e.getMessage());
104+
throw new NfeException(e.getMessage(),e);
105105
}
106106
}
107107

src/main/java/br/com/swconsultoria/nfe/Enviar.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ static TEnviNFe montaNfe(ConfiguracoesNfe config, TEnviNFe enviNFe, boolean vali
7373
return XmlNfeUtil.xmlToObject(xml, TEnviNFe.class);
7474

7575
} catch (Exception e) {
76-
throw new NfeException(e.getMessage());
76+
throw new NfeException(e.getMessage(),e);
7777
}
7878

7979
}

src/main/java/br/com/swconsultoria/nfe/Epec.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ static TRetEnvEvento eventoEpec(ConfiguracoesNfe config, TEnvEvento enviEvento,
2929
return XmlNfeUtil.xmlToObject(xml, TRetEnvEvento.class);
3030

3131
} catch (JAXBException e) {
32-
throw new NfeException(e.getMessage());
32+
throw new NfeException(e.getMessage(),e);
3333
}
3434

3535
}

0 commit comments

Comments
 (0)