fix(sj_1.2.0-beta1): 优化json转换失败的日志

This commit is contained in:
opensnail 2024-07-24 11:10:18 +08:00
parent baffeecdd8
commit a059ff4303

View File

@ -228,7 +228,7 @@ public class JsonUtil {
try {
return objectMapper.readValue(jsonString, clazz);
} catch (Exception e) {
throw new SnailJobCommonException("Json转对象失败", jsonString, e);
throw new SnailJobCommonException("Json转对象失败 参数:{}", jsonString, e);
}
}
@ -243,7 +243,7 @@ public class JsonUtil {
try {
return objectMapper.readValue(jsonString, typeReference);
} catch (Exception e) {
throw new SnailJobCommonException("Json转对象失败", e);
throw new SnailJobCommonException("Json转对象失败 参数:{}", jsonString, e);
}
}
@ -258,7 +258,7 @@ public class JsonUtil {
try {
return objectMapper.readValue(jsonString, javaType);
} catch (Exception e) {
throw new SnailJobCommonException("Json转对象失败", e);
throw new SnailJobCommonException("Json转对象失败 参数:{}", jsonString, e);
}
}
@ -272,7 +272,7 @@ public class JsonUtil {
try {
return objectMapper.readTree(jsonString);
} catch (Exception e) {
throw new SnailJobCommonException("Json转对象失败", e);
throw new SnailJobCommonException("Json转对象失败 参数:{}", jsonString, e);
}
}