You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "Shao Feng Shi (Jira)" <ji...@apache.org> on 2020/05/27 13:35:00 UTC

[jira] [Assigned] (KYLIN-1814) Avoid "catch-log-throw" pattern in source code

     [ https://issues.apache.org/jira/browse/KYLIN-1814?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shao Feng Shi reassigned KYLIN-1814:
------------------------------------

    Assignee:     (was: Dong Li)
      Labels: newbie  (was: )

> 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
>            Priority: Minor
>              Labels: newbie
>
> "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
(v8.3.4#803005)