TA 역할 Spring 경계 smoke #5
1 changed files with 29 additions and 0 deletions
|
|
@ -0,0 +1,29 @@
|
|||
package com.runtimematrix.exception;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
public abstract class BusinessException extends RuntimeException {
|
||||
|
||||
private final String code;
|
||||
private final Instant timestamp;
|
||||
private final String path;
|
||||
|
||||
protected BusinessException(String code, String message, String path) {
|
||||
super(message);
|
||||
this.code = code;
|
||||
this.timestamp = Instant.now();
|
||||
this.path = path;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public Instant getTimestamp() {
|
||||
return timestamp;
|
||||
}
|
||||
|
||||
public String getPath() {
|
||||
return path;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue