You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kylin.apache.org by "Dong Li (JIRA)" <ji...@apache.org> on 2016/06/22 08:01:57 UTC
[jira] [Created] (KYLIN-1814) Avoid "catch-log-throw" pattern in
source code
Dong Li created KYLIN-1814:
------------------------------
Summary: Avoid "catch-log-throw" pattern in source code
Key: KYLIN-1814
URL: https://issues.apache.org/jira/browse/KYLIN-1814
Project: Kylin
Issue Type: Improvement
Affects Versions: v1.5.2
Reporter: Dong Li
Assignee: Dong Li
Priority: Minor
"catch-log-throw" will make log messages mess, and we need to go through all code and fix them. For example, In CubeController class:
private JobInstance buildInternal(String cubeName, long startTime, long endTime, //
long startOffset, long endOffset, String buildType, boolean force) {
try {
String submitter = SecurityContextHolder.getContext().getAuthentication().getName();
CubeInstance cube = jobService.getCubeManager().getCube(cubeName);
return jobService.submitJob(cube, startTime, endTime, startOffset, endOffset, //
CubeBuildTypeEnum.valueOf(buildType), force, submitter);
} catch (Exception e) {
logger.error(e.getLocalizedMessage(), e);
throw new InternalErrorException(e.getLocalizedMessage());
}
}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)