2 * Copyright (C) 2017 CMCC, Inc. and others. All rights reserved.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 package org.onap.usecaseui.server.exception;
19 public class ErrorCodeException extends Exception
21 private static final long serialVersionUID = 3220072444842529499L;
23 private int categoryCode = 0;
25 private int errorCode = 1;
27 private String[] arguments = null;
29 private static String defaultText = null;
31 public static void setDefaultText(String text)
36 public static String getDefaultText()
41 public ErrorCodeException(int code, String debugMessage)
43 this(code, debugMessage, null);
46 public ErrorCodeException(int code, String debugMessage, String[] arguments)
49 this.errorCode = code;
50 this.arguments = arguments;
53 public ErrorCodeException(Throwable source, int code)
55 this(source, code, (String[])null);
58 public ErrorCodeException(Throwable source, int code, String[] arguments)
61 this.errorCode = code;
62 this.arguments = arguments;
65 public ErrorCodeException(Throwable source, int code, String debugMessage)
67 this(source, code, debugMessage, null);
70 public ErrorCodeException(Throwable source, int code, String debugMessage, String[] arguments)
72 super(debugMessage, source);
73 this.errorCode = code;
74 this.arguments = arguments;
77 public ErrorCodeException(int category, int code, String debugMessage)
79 this(category, code, debugMessage, null);
82 public ErrorCodeException(int category, int code, String debugMessage, String[] arguments)
85 this.categoryCode = category;
86 this.errorCode = code;
87 this.arguments = arguments;
90 public ErrorCodeException(Throwable source, int category, int code)
92 this(source, category, code, (String[])null);
95 public ErrorCodeException(Throwable source, int category, int code, String[] arguments)
98 this.categoryCode = category;
99 this.errorCode = code;
100 this.arguments = arguments;
103 public ErrorCodeException(Throwable source, int category, int code, String debugMessage)
105 this(source, category, code, debugMessage, null);
108 public ErrorCodeException(Throwable source, int category, int code, String debugMessage,
111 super(debugMessage, source);
112 this.categoryCode = category;
113 this.errorCode = code;
114 this.arguments = arguments;
117 public int getCategory()
122 public int getErrorCode()
127 public String[] getArguments()