BusinessException.java

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 → KILLED
        return errorCode;
29
    }
30
}

Mutations

28

1.1
Location : getErrorCode
Killed by : com.project.auth.application.support.exception.BusinessExceptionTest.[engine:junit-jupiter]/[class:com.project.auth.application.support.exception.BusinessExceptionTest]/[method:detail_message_and_cause_constructor_preserves_both()]
replaced return value with null for com/project/auth/application/support/exception/BusinessException::getErrorCode → KILLED

Active mutators

Tests examined


Report generated by PIT 1.19.1