try{
if(code == null||code.isEmpty()){
throw new Exception("CodeIsNull");
}
}catch(Exception e){
if("com.alibaba.fastjson.JSONException".equals(e.getClass().getName())){
resultMap.put("msg", "识别系统自带的异常 入 空指针异常");
}
else if("CodeIsNull".equals(e.getMessage())){
resultMap.put("msg", "通过自己抛出的异常信息来判断是否是自己控制的异常抛出");
}else{
resultMap.put("msg", "其他异常");
}
e.printStackTrace();
}