com.magician.route.commons.util.MsgUtil Maven / Gradle / Ivy
The newest version!
package com.magician.route.commons.util;
import java.util.HashMap;
import java.util.Map;
/**
* error message tool
*/
public class MsgUtil {
/**
* Get error message
* @param errorCode code
* @param errorMsg 信息
* @return 异常
*/
public static String getMsg(Integer errorCode, String errorMsg){
Map jsonObject = new HashMap<>();
jsonObject.put("error_code", errorCode);
jsonObject.put("error_info", errorMsg);
return JSONUtil.toJSONString(jsonObject);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy