#
18516761980
2022-06-14 d16d3b70e94f798d7e5abd145f8566d81d0c66c9
src/main/java/com/zy/asrs/task/AbstractHandler.java
@@ -1,5 +1,10 @@
package com.zy.asrs.task;
import com.zy.asrs.task.core.AsrsException;
import com.zy.asrs.task.core.ReturnT;
import java.text.MessageFormat;
/**
 * Created by vincent on 2020/7/4
 */
@@ -8,10 +13,14 @@
    public final ReturnT<T> SUCCESS = new ReturnT<>(200, null);
    public final ReturnT<T> FAIL = new ReturnT<>(500, null);
    protected abstract ReturnT<T> start();
//    protected abstract ReturnT<T> start();
    protected void exceptionHandle(String errorMsg){
        throw new AsrsException(errorMsg);
        exceptionHandle(errorMsg, (Object) null);
    }
    protected void exceptionHandle(String errorMsg, Object... args){
        throw new AsrsException(MessageFormat.format(errorMsg, args));
    }
}