| 1 | package com.project.auth.application.support.exception; | |
| 2 | ||
| 3 | public abstract class BusinessException extends RuntimeException { | |
| 4 | ||
| 5 | private final ClientFacingErrorCode errorCode; | |
| 6 | ||
| 7 | protected BusinessException(ClientFacingErrorCode errorCode) { | |
| 8 | super(errorCode.message()); | |
| 9 | this.errorCode = errorCode; | |
| 10 | } | |
| 11 | ||
| 12 | protected BusinessException(ClientFacingErrorCode errorCode, String detailMessage) { | |
| 13 | super(detailMessage); | |
| 14 | this.errorCode = errorCode; | |
| 15 | } | |
| 16 | ||
| 17 | protected BusinessException(ClientFacingErrorCode errorCode, Throwable cause) { | |
| 18 | super(errorCode.message(), cause); | |
| 19 | this.errorCode = errorCode; | |
| 20 | } | |
| 21 | ||
| 22 | protected BusinessException(ClientFacingErrorCode errorCode, String detailMessage, Throwable cause) { | |
| 23 | super(detailMessage, cause); | |
| 24 | this.errorCode = errorCode; | |
| 25 | } | |
| 26 | ||
| 27 | public ClientFacingErrorCode getErrorCode() { | |
| 28 |
1
1. getErrorCode : replaced return value with null for com/project/auth/application/support/exception/BusinessException::getErrorCode → NO_COVERAGE |
return errorCode; |
| 29 | } | |
| 30 | } | |
Mutations | ||
| 28 |
1.1 |