Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0031452Openbravo ERPA. Platformpublic2015-11-12 14:192015-12-11 10:46
aferraz 
aferraz 
normalminorhave not tried
closedfixed 
5
 
 
dmiguelez
Core
No
0031452: Controlled exceptions should not be logged in error mode
When we do some checks while running any process and we want to inform user about any controlled error, we normally throw an OBException which is logged in error mode, and it should not.
Only uncontrolled exceptions should be logged in error mode.

It will be better to show an error in the UI (as it is done now), and to log the exception in debug mode instead of in error mode.
This will help to have a more clear log.

In this case, instead of using:
  throw new OBException(message);
we should use:
  log.debug(message);
  throw new OBException(message, false);
to tell OBException we do not want to log the exception in error mode, and do it ourselves in debug mode.
N/A
No tags attached.
depends on defect 00314513.0PR16Q1 closed aferraz Error should not be logged in case we throw an OBException with logException parameter as false 
Issue History
2015-11-12 14:19aferrazNew Issue
2015-11-12 14:19aferrazAssigned To => platform
2015-11-12 14:19aferrazModules => Core
2015-11-12 14:19aferrazTriggers an Emergency Pack => No
2015-11-12 14:20aferrazSummaryControlled exceptions should not be logged => Controlled exceptions should not be logged in error mode
2015-11-12 14:21aferrazDescription Updatedbug_revision_view_page.php?rev_id=10190#r10190
2015-11-12 14:43aferrazRelationship addeddepends on 0031451
2015-11-12 14:53aferrazAssigned Toplatform => aferraz
2015-11-23 13:24hgbotCheckin
2015-11-23 13:24hgbotNote Added: 0082087
2015-11-23 13:24hgbotStatusnew => resolved
2015-11-23 13:24hgbotResolutionopen => fixed
2015-11-23 13:24hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/2ec4bfb5b7c9aaa42dce9dca5ac05bd73c818a48 [^]
2015-11-23 13:24hgbotCheckin
2015-11-23 13:24hgbotNote Added: 0082088
2015-11-23 13:24hgbotCheckin
2015-11-23 13:24hgbotNote Added: 0082089
2015-11-23 21:17hudsonbotCheckin
2015-11-23 21:17hudsonbotNote Added: 0082269
2015-11-23 21:17hudsonbotCheckin
2015-11-23 21:17hudsonbotNote Added: 0082270
2015-11-23 21:17hudsonbotCheckin
2015-11-23 21:17hudsonbotNote Added: 0082271
2015-12-11 10:46dmiguelezReview Assigned To => dmiguelez
2015-12-11 10:46dmiguelezNote Added: 0082677
2015-12-11 10:46dmiguelezStatusresolved => closed

Notes
(0082087)
hgbot   
2015-11-23 13:24   
Repository: erp/devel/pi
Changeset: 2ec4bfb5b7c9aaa42dce9dca5ac05bd73c818a48
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Thu Nov 12 14:34:31 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/2ec4bfb5b7c9aaa42dce9dca5ac05bd73c818a48 [^]

Fixes issue 31452: Avoid log @APRM_INVALID_TRANSACTION@ exception in error mode

Avoid log @APRM_INVALID_TRANSACTION@ exception in error mode in FIN_FinaccTransactionEventListener.validateTransactionType method, and do it in debug mode instead.
This will avoid unstable executions when running APRM automated tests.

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/event/FIN_FinaccTransactionEventListener.java
---
(0082088)
hgbot   
2015-11-23 13:24   
Repository: erp/devel/pi
Changeset: c3fce2ec13d9df8b1e536d8edad53e6847e69e10
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Thu Nov 12 14:45:02 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/c3fce2ec13d9df8b1e536d8edad53e6847e69e10 [^]

Related to issue 31452: Avoid log @APRM_PaymentNoLines@ exception in error mode

Avoid log @APRM_PaymentNoLines@ exception in error mode in FIN_PaymentProcess.processPayment method, and do it in debug mode instead.
This will avoid unstable executions when running APRM automated tests.

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java
---
(0082089)
hgbot   
2015-11-23 13:24   
Repository: erp/devel/pi
Changeset: 8a03fc30c8e38b22222f4806a3dc1437f19baec5
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Thu Nov 12 14:52:08 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/8a03fc30c8e38b22222f4806a3dc1437f19baec5 [^]

Related to issue 31452: Avoid log @PeriodNotAvailable@ exception in error mode

Avoid log @PeriodNotAvailable@ exception in error mode in AddPaymentActionHandler.createNewPayment method, and do it in debug mode instead.
This will avoid unstable executions when running APRM automated tests.

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/AddPaymentActionHandler.java
---
(0082269)
hudsonbot   
2015-11-23 21:17   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/7b56bebaaa88 [^]
Maturity status: Test
(0082270)
hudsonbot   
2015-11-23 21:17   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/7b56bebaaa88 [^]
Maturity status: Test
(0082271)
hudsonbot   
2015-11-23 21:17   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/7b56bebaaa88 [^]
Maturity status: Test
(0082677)
dmiguelez   
2015-12-11 10:46   
Code Review + Testing Ok