chore: optimize exception message

This commit is contained in:
Michael Yang 2024-02-29 10:19:29 +08:00
parent d834048670
commit 0774f1f529

View File

@ -226,7 +226,7 @@ public class EntitySqlProvider {
public static String update(Map params, ProviderContext context) { public static String update(Map params, ProviderContext context) {
Object entity = ProviderUtil.getEntity(params); Object entity = ProviderUtil.getEntity(params);
FlexAssert.notNull(entity, "entity can not be null"); FlexAssert.notNull(entity, "entity can not be null for execute update");
boolean ignoreNulls = ProviderUtil.isIgnoreNulls(params); boolean ignoreNulls = ProviderUtil.isIgnoreNulls(params);
@ -239,7 +239,7 @@ public class EntitySqlProvider {
Object[] primaryValues = tableInfo.buildPkSqlArgs(entity); Object[] primaryValues = tableInfo.buildPkSqlArgs(entity);
Object[] tenantIdArgs = tableInfo.buildTenantIdArgs(); Object[] tenantIdArgs = tableInfo.buildTenantIdArgs();
FlexAssert.assertAreNotNull(primaryValues, "The value of primary key must not be null, entity[%s]", entity); FlexAssert.assertAreNotNull(primaryValues, "The value of primary key must not be null for execute update an entity, entity[%s]", entity);
ProviderUtil.setSqlArgs(params, ArrayUtil.concat(updateValues, primaryValues, tenantIdArgs)); ProviderUtil.setSqlArgs(params, ArrayUtil.concat(updateValues, primaryValues, tenantIdArgs));