Project:
View Revisions: Issue #31452 | [ Back to Issue ] | ||
Summary | 0031452: Controlled exceptions should not be logged in error mode | ||
Revision | 2015-11-12 14:21 by aferraz | ||
Description | 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. |
||
Revision | 2015-11-12 14:20 by aferraz | ||
Description | 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 cases, 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. |
Copyright © 2000 - 2009 MantisBT Group |