package com.zy.asrs.task; import java.text.MessageFormat; /** * Created by vincent on 2020/7/4 */ public abstract class AbstractHandler { public final ReturnT SUCCESS = new ReturnT<>(200, null); public final ReturnT FAIL = new ReturnT<>(500, null); // protected abstract ReturnT start(); protected void exceptionHandle(String errorMsg){ exceptionHandle(errorMsg, (Object) null); } protected void exceptionHandle(String errorMsg, Object... args){ throw new AsrsException(MessageFormat.format(errorMsg, args)); } }