first commit
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
package com.krt.flower.Flower.exception;
|
||||
|
||||
import com.krt.flower.Flower.dto.SurveyDataStructureDto;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
import lombok.ToString;
|
||||
|
||||
@Getter
|
||||
@ToString
|
||||
public class ApiExceptionEntity {
|
||||
|
||||
private String errorCode;
|
||||
private String errorMessage;
|
||||
private SurveyDataStructureDto errorPoint;
|
||||
|
||||
@Builder
|
||||
public ApiExceptionEntity(String errorCode, String errorMessage, String errorPoint) {
|
||||
|
||||
|
||||
this.errorCode = errorCode;
|
||||
this.errorMessage = errorMessage;
|
||||
|
||||
if(errorPoint != null) {
|
||||
//surveyInfo
|
||||
int tensor = Integer.parseInt(errorPoint.split("\\|\\|")[0]);
|
||||
int matrix = Integer.parseInt(errorPoint.split("\\|\\|")[1]);
|
||||
int scalar = Integer.parseInt(errorPoint.split("\\|\\|")[2]);
|
||||
|
||||
this.errorPoint = SurveyDataStructureDto.builder()
|
||||
.t(tensor)
|
||||
.m(matrix)
|
||||
.s(scalar)
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user