Skip to content

Commit

Permalink
Throwable에서 catch하던 NullPointerException를 분리하여 catch
Browse files Browse the repository at this point in the history
  • Loading branch information
kim-hwi authored Aug 29, 2023
1 parent 3d012cd commit a1fe66d
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,12 @@ public int start(String jobPath, String jobIdentifier, String[] parameters, Set<
LOGGER.warn("jobExecutionTime=" + (jobExecution.getEndTime().getTime() - jobExecution.getStartTime().getTime()) / 1000f + "s");

return exitCodeMapper.intValue(jobExecution.getExitStatus().getExitCode());
} catch (NullPointerException e) {
String message = "Job Terminated in error: " + e.getMessage();
//2017.02.15 장동한 시큐어코딩(ES)-부적절한 예외 처리[CWE-253, CWE-440, CWE-754]
LOGGER.error("["+e.getClass()+"] Try/Catch...NullPointerException : " + e.getMessage());
EgovCommandLineRunner.message = message;
return exitCodeMapper.intValue(ExitStatus.FAILED.getExitCode());
} catch (Throwable e) {
String message = "Job Terminated in error: " + e.getMessage();
//2017.02.15 장동한 시큐어코딩(ES)-부적절한 예외 처리[CWE-253, CWE-440, CWE-754]
Expand Down

0 comments on commit a1fe66d

Please sign in to comment.