TA 역할 Spring 경계 smoke (role-ta-live-1522-001)

This commit is contained in:
forge-bot 2026-07-14 06:58:55 +00:00
parent 63ed044c81
commit 9a9dd78c1a

View file

@ -0,0 +1,34 @@
package com.klaroworks.runtime.exception;
public abstract class BaseException extends RuntimeException {
private final ErrorCode errorCode;
protected BaseException(ErrorCode errorCode) {
super(errorCode.getMessage());
this.errorCode = errorCode;
}
protected BaseException(ErrorCode errorCode, String message) {
super(message);
this.errorCode = errorCode;
}
public ErrorCode getErrorCode() { return errorCode; }
}
class BusinessException extends BaseException {
public BusinessException(ErrorCode errorCode) { super(errorCode); }
public BusinessException(ErrorCode errorCode, String message) { super(errorCode, message); }
}
class RoleNotFoundException extends BusinessException {
public RoleNotFoundException(Long roleId) {
super(ErrorCode.ROLE_NOT_FOUND, String.format("Role not found with id: %d", roleId));
}
}
class DuplicateResourceException extends BusinessException {
public DuplicateResourceException(String resourceType, String identifier) {
super(ErrorCode.DUPLICATE_ROLE_NAME, String.format("%s '%s' already exists", resourceType, identifier));
}
}