自动化立体仓库 - WMS系统
#
luxiaotao1123
2021-05-31 439452f59b03556aecc5dd6dbaa8f064b70cd026
src/main/java/com/zy/asrs/task/AbstractHandler.java
@@ -1,5 +1,9 @@
package com.zy.asrs.task;
import com.core.exception.CoolException;
import com.zy.asrs.task.core.AsrsException;
import com.zy.asrs.task.core.ReturnT;
import java.text.MessageFormat;
/**
@@ -10,14 +14,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){
        exceptionHandle(errorMsg, (Object) null);
    }
    protected void exceptionHandle(String errorMsg, Object... args){
        throw new AsrsException(MessageFormat.format(errorMsg, args));
        throw new CoolException(MessageFormat.format(errorMsg, args));
    }
}