From 6229a61965898eab80d5c55bd0b460e76ca5dfca Mon Sep 17 00:00:00 2001 From: brfrn169 Date: Thu, 26 Dec 2024 22:53:52 +0900 Subject: [PATCH] Add prefix to error code --- core/src/main/java/com/scalar/db/common/error/CoreError.java | 2 +- .../test/java/com/scalar/db/common/error/CoreErrorTest.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/com/scalar/db/common/error/CoreError.java b/core/src/main/java/com/scalar/db/common/error/CoreError.java index 5d2eba33e5..eeafaea873 100644 --- a/core/src/main/java/com/scalar/db/common/error/CoreError.java +++ b/core/src/main/java/com/scalar/db/common/error/CoreError.java @@ -979,7 +979,7 @@ public enum CoreError implements ScalarDbError { ""), ; - private static final String COMPONENT_NAME = "CORE"; + private static final String COMPONENT_NAME = "DB-CORE"; private final Category category; private final String id; diff --git a/core/src/test/java/com/scalar/db/common/error/CoreErrorTest.java b/core/src/test/java/com/scalar/db/common/error/CoreErrorTest.java index 00026b2d4d..5ab0c4397e 100644 --- a/core/src/test/java/com/scalar/db/common/error/CoreErrorTest.java +++ b/core/src/test/java/com/scalar/db/common/error/CoreErrorTest.java @@ -23,7 +23,7 @@ public void buildCode_ShouldBuildCorrectCode() { String code = error.buildCode(); // Assert - Assertions.assertThat(code).isEqualTo("CORE-10000"); + Assertions.assertThat(code).isEqualTo("DB-CORE-10000"); } @Test @@ -43,6 +43,6 @@ public void buildMessage_ShouldBuildCorrectMessage() { // Assert Assertions.assertThat(message) - .isEqualTo("CORE-10000: Only a single-column index is supported. Operation: " + put); + .isEqualTo("DB-CORE-10000: Only a single-column index is supported. Operation: " + put); } }