X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=ves-agent%2Fsrc%2Fmain%2Fjava%2Forg%2Fcommscope%2Ftr069adapter%2Fvesagent%2Fexception%2FVesAgentException.java;h=f5cb14ca208858f94f6f869fcda69edeada8f444;hb=76744e810f35c84ecbd1d9998e361052466e9483;hp=77afc6574a75e2fde29670cd6f0016ceabf64a45;hpb=ce4e2d38e3d42725f61c39dd172325d2def4bc44;p=oam%2Ftr069-adapter.git diff --git a/ves-agent/src/main/java/org/commscope/tr069adapter/vesagent/exception/VesAgentException.java b/ves-agent/src/main/java/org/commscope/tr069adapter/vesagent/exception/VesAgentException.java index 77afc65..f5cb14c 100644 --- a/ves-agent/src/main/java/org/commscope/tr069adapter/vesagent/exception/VesAgentException.java +++ b/ves-agent/src/main/java/org/commscope/tr069adapter/vesagent/exception/VesAgentException.java @@ -16,84 +16,81 @@ * ===============LICENSE_END======================================================================= */ -package org.commscope.tr069adapter.vesagent.exception; - -/** - * - * @version 1.0 - * @since May 21, 2020 - * @author Prashant - */ -public class VesAgentException extends Exception { - private static final long serialVersionUID = -3742697051389101875L; - - private static final String ERRORMSG_PREFIX = "ves-agent"; - - private String[] arguments; - - private String errorCode; - private String message; - - // index of the error occurred in the given list or in the given file - protected int errorIndex = -1; - - - /** - * Constructs a VesOperationException with no detail message. - * - */ - public VesAgentException() { - super(); - } - - /** - * Constructs a VesOperationException with the specified detail message. - * - * @param s as the details message - */ - public VesAgentException(String s) { - super(s); - } - - public VesAgentException(String... args) { - super(); - arguments = args; - setErrorMessage(getErrorMessage()); - } - - public VesAgentException(String errorCode, String errorMsg) { - super(); - this.errorCode = errorCode; - setErrorMessage(getErrorMessage()); - } - - public int getErrorIndex() { - return errorIndex; - } - - public void setErrorIndex(int errorIndex) { - this.errorIndex = errorIndex; - } - - - public String getMessage() { - return message; - } - - private String getErrorMessage() { - String key = ERRORMSG_PREFIX + "."; - return key; - } - - private void setErrorMessage(String message) { - this.message = message; - } - - public String getErrorCode() { - return errorCode; - } - - public void setErrorCode(String errorCode) { - this.errorCode = errorCode; - } -} +package org.commscope.tr069adapter.vesagent.exception; + +/** + * + * @version 1.0 + * @since May 21, 2020 + * @author Prashant + */ +public class VesAgentException extends Exception { + private static final long serialVersionUID = -3742697051389101875L; + + private static final String ERRORMSG_PREFIX = "ves-agent"; + + + private String errorCode; + private String message; + + // index of the error occurred in the given list or in the given file + protected int errorIndex = -1; + + + /** + * Constructs a VesOperationException with no detail message. + * + */ + public VesAgentException() { + super(); + } + + /** + * Constructs a VesOperationException with the specified detail message. + * + * @param s as the details message + */ + public VesAgentException(String s) { + super(s); + } + + public VesAgentException(String... args) { + super(); + setErrorMessage(getErrorMessage()); + } + + public VesAgentException(String errorCode, String errorMsg) { + super(); + this.errorCode = errorCode; + setErrorMessage(getErrorMessage()); + } + + public int getErrorIndex() { + return errorIndex; + } + + public void setErrorIndex(int errorIndex) { + this.errorIndex = errorIndex; + } + + @Override + public String getMessage() { + return message; + } + + private String getErrorMessage() { + return ERRORMSG_PREFIX + "."; + } + + private void setErrorMessage(String message) { + this.message = message; + } + + public String getErrorCode() { + return errorCode; + } + + public void setErrorCode(String errorCode) { + this.errorCode = errorCode; + } +}