懒羊羊
2024-01-31 e57a8990ae56f657a59c435a0613c5f7a8728003
提交 | 用户 | 时间
e57a89 1 package com.jcdm.common.exception.job;
2
3 /**
4  * 计划策略异常
5  * 
6  * @author jc
7  */
8 public class TaskException extends Exception
9 {
10     private static final long serialVersionUID = 1L;
11
12     private Code code;
13
14     public TaskException(String msg, Code code)
15     {
16         this(msg, code, null);
17     }
18
19     public TaskException(String msg, Code code, Exception nestedEx)
20     {
21         super(msg, nestedEx);
22         this.code = code;
23     }
24
25     public Code getCode()
26     {
27         return code;
28     }
29
30     public enum Code
31     {
32         TASK_EXISTS, NO_TASK_EXISTS, TASK_ALREADY_STARTED, UNKNOWN, CONFIG_ERROR, TASK_NODE_NOT_AVAILABLE
33     }
34 }