diff --git a/src/main/java/com/kamco/cd/kamcoback/common/exception/CustomApiException.java b/src/main/java/com/kamco/cd/kamcoback/common/exception/CustomApiException.java index 1e1d9828..ca4dc021 100644 --- a/src/main/java/com/kamco/cd/kamcoback/common/exception/CustomApiException.java +++ b/src/main/java/com/kamco/cd/kamcoback/common/exception/CustomApiException.java @@ -27,4 +27,10 @@ public class CustomApiException extends RuntimeException { this.codeName = errorCode.getCode(); this.status = errorCode.getStatus(); } + + public CustomApiException(String codeName, HttpStatus status, Throwable cause) { + super(codeName, cause); + this.codeName = codeName; + this.status = status; + } } diff --git a/src/main/java/com/kamco/cd/kamcoback/postgres/core/MapSheetMngCoreService.java b/src/main/java/com/kamco/cd/kamcoback/postgres/core/MapSheetMngCoreService.java index 6b3a83a0..25cb548b 100644 --- a/src/main/java/com/kamco/cd/kamcoback/postgres/core/MapSheetMngCoreService.java +++ b/src/main/java/com/kamco/cd/kamcoback/postgres/core/MapSheetMngCoreService.java @@ -283,11 +283,19 @@ public class MapSheetMngCoreService { // 4) 파일 생성 try { + log.info("create Directories outputPath: {}", outputPath); + log.info( + "activeEnv={}, inferenceDir={}, targetDir={}, filename={}", + activeEnv, + inferenceDir, + targetDir, + filename); + log.info("outputPath={}, parent={}", outputPath.toAbsolutePath(), outputPath.getParent()); Files.createDirectories(outputPath.getParent()); new GeoJsonFileWriter() .exportToFile(sceneInference, "scene_inference_" + yyyy, 5186, outputPath.toString()); - + log.info("GeoJsonFileWriter: {}", "scene_inference_" + yyyy); Scene scene = new Scene(); scene.setFeatures(sceneInference); scene.setFilePath(outputPath.toString()); @@ -297,7 +305,7 @@ public class MapSheetMngCoreService { } catch (IOException e) { log.error( "FAIL_CREATE_MAP_SHEET_FILE: yyyy={}, isAll={}, path={}", yyyy, isAll, outputPath, e); - throw new CustomApiException("FAIL_CREATE_MAP_SHEET_FILE", HttpStatus.INTERNAL_SERVER_ERROR); + throw new CustomApiException("INTERNAL_SERVER_ERROR", HttpStatus.INTERNAL_SERVER_ERROR, e); } }