From a2293ad1ab0c143ab88d70dbbb3fdcb4f34bdb5b Mon Sep 17 00:00:00 2001 From: teddy Date: Mon, 23 Feb 2026 16:35:52 +0900 Subject: [PATCH] =?UTF-8?q?=EC=B6=94=EB=A1=A0=EC=8B=A4=ED=96=89=20?= =?UTF-8?q?=EC=97=90=EB=9F=AC=EB=A1=9C=EA=B7=B8=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/exception/CustomApiException.java | 6 ++++++ .../postgres/core/MapSheetMngCoreService.java | 12 ++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) 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); } }