diff options
Diffstat (limited to 'mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/exceptions/ApiException.java')
-rw-r--r-- | mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/exceptions/ApiException.java | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/exceptions/ApiException.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/exceptions/ApiException.java index fdf6b80e1c..c7f6459482 100644 --- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/exceptions/ApiException.java +++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/exceptions/ApiException.java @@ -22,36 +22,34 @@ package org.onap.so.apihandlerinfra.exceptions; import java.util.List; - - import org.onap.so.apihandlerinfra.logging.ErrorLoggerInfo; -public abstract class ApiException extends Exception{ +public abstract class ApiException extends Exception { /** - * - */ - private static final long serialVersionUID = 683162058616691134L; - private int httpResponseCode; + * + */ + private static final long serialVersionUID = 683162058616691134L; + private int httpResponseCode; private String messageID; private ErrorLoggerInfo errorLoggerInfo; - private List<String> variables; + private List<String> variables; - public ApiException(Builder builder){ + public ApiException(Builder builder) { super(builder.message, builder.cause); this.httpResponseCode = builder.httpResponseCode; this.messageID = builder.messageID; this.variables = builder.variables; this.errorLoggerInfo = builder.errorLoggerInfo; - this.variables = builder.variables; + this.variables = builder.variables; } public ApiException(String message, Throwable cause) { - super(message, cause); - } + super(message, cause); + } - public String getMessageID() { + public String getMessageID() { return messageID; } @@ -76,7 +74,7 @@ public abstract class ApiException extends Exception{ private ErrorLoggerInfo errorLoggerInfo = null; private List<String> variables = null; - + public Builder(String message, int httpResponseCode, String messageID) { this.message = message; this.httpResponseCode = httpResponseCode; @@ -103,7 +101,7 @@ public abstract class ApiException extends Exception{ return (T) this; } - public T errorInfo(ErrorLoggerInfo errorLoggerInfo){ + public T errorInfo(ErrorLoggerInfo errorLoggerInfo) { this.errorLoggerInfo = errorLoggerInfo; return (T) this; } |