1 package org.commscope.tr069adapter.vesagent.exception;
\r
6 * @since May 21, 2020
\r
9 public class VesAgentException extends Exception {
\r
10 private static final long serialVersionUID = -3742697051389101875L;
\r
12 private static final String ERRORMSG_PREFIX = "ves-agent";
\r
14 private String[] arguments;
\r
16 private String errorCode;
\r
17 private String message;
\r
19 // index of the error occurred in the given list or in the given file
\r
20 protected int errorIndex = -1;
\r
24 * Constructs a <code>VesOperationException</code> with no detail message.
\r
27 public VesAgentException() {
\r
32 * Constructs a <code>VesOperationException</code> with the specified detail message.
\r
34 * @param s as the details message
\r
36 public VesAgentException(String s) {
\r
40 public VesAgentException(String... args) {
\r
43 setErrorMessage(getErrorMessage());
\r
46 public VesAgentException(String errorCode, String errorMsg) {
\r
48 this.errorCode = errorCode;
\r
49 setErrorMessage(getErrorMessage());
\r
52 public int getErrorIndex() {
\r
56 public void setErrorIndex(int errorIndex) {
\r
57 this.errorIndex = errorIndex;
\r
61 public String getMessage() {
\r
65 private String getErrorMessage() {
\r
66 String key = ERRORMSG_PREFIX + ".";
\r
70 private void setErrorMessage(String message) {
\r
71 this.message = message;
\r
74 public String getErrorCode() {
\r
78 public void setErrorCode(String errorCode) {
\r
79 this.errorCode = errorCode;
\r