diff --git a/src/com/rjconsultores/integracaoreceitadespesa/dao/Totalbus.java b/src/com/rjconsultores/integracaoreceitadespesa/dao/Totalbus.java index 265b0d16b..eb582e84d 100644 --- a/src/com/rjconsultores/integracaoreceitadespesa/dao/Totalbus.java +++ b/src/com/rjconsultores/integracaoreceitadespesa/dao/Totalbus.java @@ -62,10 +62,10 @@ public class Totalbus { pontosVenda.add(puntoVenta); } } catch (Exception e){ - log.error("", e); + log.error(e.getMessage(), e); } finally { - try { rs.close(); } catch (Exception ignore) { log.error("", ignore); } - try { pstmt.close(); } catch (Exception ignore) { log.error("", ignore); } + try { rs.close(); } catch (Exception ignore) { log.error(ignore.getMessage(), ignore); } + try { pstmt.close(); } catch (Exception ignore) { log.error(ignore.getMessage(), ignore); } } } @@ -83,10 +83,10 @@ public class Totalbus { empresas.add(empresa); } } catch (Exception e){ - log.error("", e); + log.error(e.getMessage(), e); } finally { - try { rs.close(); } catch (Exception ignore) { log.error("", ignore); } - try { pstmt.close(); } catch (Exception ignore) { log.error("", ignore); } + try { rs.close(); } catch (Exception ignore) { log.error(ignore.getMessage(), ignore); } + try { pstmt.close(); } catch (Exception ignore) { log.error(ignore.getMessage(), ignore); } } } @@ -156,10 +156,10 @@ public class Totalbus { despesas.add(receita); } } catch (Exception e){ - log.error(e.toString(),e); + log.error(e.getMessage(),e); } finally { - try { rs.close(); } catch (Exception ignore) { log.error("", ignore); } - try { stmt.close(); } catch (Exception ignore) { log.error("", ignore); } + try { rs.close(); } catch (Exception ignore) { log.error(ignore.getMessage(), ignore); } + try { stmt.close(); } catch (Exception ignore) { log.error(ignore.getMessage(), ignore); } } return despesas; } @@ -220,10 +220,10 @@ public class Totalbus { despesas.add(despesa); } } catch (Exception e){ - log.error("", e); + log.error(e.getMessage(), e); } finally { - try { rs.close(); } catch (Exception ignore) { log.error("", ignore); } - try { pstmt.close(); } catch (Exception ignore) { log.error("", ignore); } + try { rs.close(); } catch (Exception ignore) { log.error(ignore.getMessage(), ignore); } + try { pstmt.close(); } catch (Exception ignore) { log.error(ignore.getMessage(), ignore); } } return despesas; } @@ -316,10 +316,10 @@ public class Totalbus { } log.debug("Total depósitos: " + soma); } catch (Exception e){ - log.error("", e); + log.error(e.getMessage(), e); } finally { - try { rs.close(); } catch (Exception ignore) { log.error("", ignore); } - try { pstmt.close(); } catch (Exception ignore) { log.error("", ignore); } + try { rs.close(); } catch (Exception ignore) { log.error(ignore.getMessage(), ignore); } + try { pstmt.close(); } catch (Exception ignore) { log.error(ignore.getMessage(), ignore); } } return depositos; } @@ -337,10 +337,10 @@ public class Totalbus { result = rs.getInt(1); } } catch (Exception e){ - log.error("", e); + log.error(e.getMessage(), e); } finally { - try { rs.close(); } catch (Exception ignore) { log.error("", ignore); } - try { pstmt.close(); } catch (Exception ignore) { log.error("", ignore); } + try { rs.close(); } catch (Exception ignore) { log.error(ignore.getMessage(), ignore); } + try { pstmt.close(); } catch (Exception ignore) { log.error(ignore.getMessage(), ignore); } } return result;