我的代码正在引发外键异常。
MySQL 8.0.12显示了完整的异常消息(带有外键名),但当我升级到MySQL 8.0.28时,它没有显示完整的异常信息。
MySQL 8.0.12中出现异常:
Exceptions.ForeignKeyFailedException: Upsert failed as some referenced entity doesnt exist. ---> MySql.Data.MySqlClient.MySqlException: Cannot add or update a child row: a foreign key constraint fails (`SchemaName`.`table name`, CONSTRAINT `foreign key name` FOREIGN KEY (`column`) REFERENCES `table name` (`column`) ON UPDATE CASCADE)
MySQL 8.0.28中出现异常:
Exceptions.ForeignKeyFailedException: Upsert failed as some referenced entity doesnt exist. ---> MySql.Data.MySqlClient.MySqlException: Cannot add or update a child row: a foreign key constraint fails
如何在MySQL 8.0.28或更高版本中显示完整的异常消息?