Code Review
/
nonrtric.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
NONRTRIC - Enrichment Coordinator Service, Changed error codes
[nonrtric.git]
/
enrichment-coordinator-service
/
src
/
main
/
java
/
org
/
oransc
/
enrichment
/
exceptions
/
ServiceException.java
diff --git
a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/exceptions/ServiceException.java
b/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/exceptions/ServiceException.java
index
a14e8de
..
bce786f
100644
(file)
--- a/
enrichment-coordinator-service/src/main/java/org/oransc/enrichment/exceptions/ServiceException.java
+++ b/
enrichment-coordinator-service/src/main/java/org/oransc/enrichment/exceptions/ServiceException.java
@@
-18,15
+18,23
@@
package org.oransc.enrichment.exceptions;
package org.oransc.enrichment.exceptions;
+import lombok.Getter;
+
+import org.springframework.http.HttpStatus;
+
public class ServiceException extends Exception {
private static final long serialVersionUID = 1L;
public class ServiceException extends Exception {
private static final long serialVersionUID = 1L;
-
- public ServiceException(String message) {
- super(message);
- }
+ @Getter
+ private final HttpStatus httpStatus;
public ServiceException(String message, Exception originalException) {
super(message, originalException);
public ServiceException(String message, Exception originalException) {
super(message, originalException);
+ this.httpStatus = null;
+ }
+
+ public ServiceException(String message, HttpStatus httpStatus) {
+ super(message);
+ this.httpStatus = httpStatus;
}
}
}
}