terminate called after throwing an instance of 'sqr::CExp' what(): mysql_real_query failed with error: Duplicate entry

意思是:

  • 你在执行某条 SQL(例如 INSERT INTO enusers (...) VALUES (...))时,

  • 数据库表 enusers 中的 email 字段唯一索引(UNIQUE KEY)

  • 插入的值 258155355@qq.com 已经存在;

  • 因此触发了 MySQL 错误 Duplicate entry for key 'enusers.email'

  • 你的 sqr::IDatabase 或其封装类(例如 sqr::CExp)把这个错误抛出来了;

  • 程序没有捕获异常 → 导致 terminate called after throwing(异常未处理,程序崩溃)。

posted on 2025-10-19 15:46  lydstory  阅读(11)  评论(0)    收藏  举报

导航