瀏覽代碼

更新K8sApiException

raledong 7 年之前
父節點
當前提交
ca4dff5669
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      src/main/java/nju/seec/SEECdemo/logic/api/k8s/exception/K8sApiException.java

+ 3 - 0
src/main/java/nju/seec/SEECdemo/logic/api/k8s/exception/K8sApiException.java

@@ -21,6 +21,7 @@ public class K8sApiException extends Exception{
     public static final int RESOURCE_QUOTA_NOT_EXIST = 402;
     public static final int RESOURCE_QUOTA_NOT_EXIST = 402;
 
 
     public static final int NAMESPACE_ALREADY_EXIST = 500;
     public static final int NAMESPACE_ALREADY_EXIST = 500;
+    public static final int RESOURCE_QUOTA_ALREADY_EXIST = 501;
 
 
     public static final int ILLEGAL_PARAMETER = 100;
     public static final int ILLEGAL_PARAMETER = 100;
 
 
@@ -28,6 +29,7 @@ public class K8sApiException extends Exception{
 
 
     public static final int COMMAND_FAIL = 300;
     public static final int COMMAND_FAIL = 300;
 
 
+
     public static final K8sApiException K8s_SYSTEM_ERROR_EXCEPTION = new K8sApiException(SYSTEM_ERROR);
     public static final K8sApiException K8s_SYSTEM_ERROR_EXCEPTION = new K8sApiException(SYSTEM_ERROR);
     //系统故障
     //系统故障
     static {
     static {
@@ -36,6 +38,7 @@ public class K8sApiException extends Exception{
         codeMap.put(RESOURCE_QUOTA_NOT_EXIST, "资源限额不存在");
         codeMap.put(RESOURCE_QUOTA_NOT_EXIST, "资源限额不存在");
 
 
         codeMap.put(NAMESPACE_ALREADY_EXIST, "命名空间已经存在");
         codeMap.put(NAMESPACE_ALREADY_EXIST, "命名空间已经存在");
+        codeMap.put(RESOURCE_QUOTA_ALREADY_EXIST, "资源限额已经存在");
 
 
         codeMap.put(ILLEGAL_PARAMETER, "非法参数");
         codeMap.put(ILLEGAL_PARAMETER, "非法参数");