details: https://code.openbravo.com/erp/devel/pi/rev/415e2a692c2d changeset: 32418:415e2a692c2d user: Stefan Hühner <stefan.huehner <at> openbravo.com> date: Thu Jul 06 12:31:24 2017 +0200 summary: Fixed 36429. Change code-generation to not use printStackTrace but log4j.error
printStackTrace should not be used but the standard log4j.error instead. This changes the SqlC code-generator which had 1 common case left not following this. Also it adds strSql as context to the logging message to make debugging easier. diffstat: src-core/src/org/openbravo/data/Sqlc.java | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diffs (14 lines): diff -r c557445d5d66 -r 415e2a692c2d src-core/src/org/openbravo/data/Sqlc.java --- a/src-core/src/org/openbravo/data/Sqlc.java Thu Jul 06 14:07:15 2017 +0200 +++ b/src-core/src/org/openbravo/data/Sqlc.java Thu Jul 06 12:31:24 2017 +0200 @@ -1512,8 +1512,8 @@ else out2.append(" connectionProvider.releaseTransactionalPreparedStatement(st);\n"); } - out2.append(" } catch(Exception ignore){\n"); - out2.append(" ignore.printStackTrace();\n"); + out2.append(" } catch(Exception e){\n"); + out2.append(" log4j.error(\"Error during release*Statement of query: \" + strSql, e);\n"); out2.append(" }\n"); out2.append(" }\n"); if (sql.sqlType.equals("callableStatement")) { ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits