Core/DB: Improved terrible assertion message

(cherry picked from commit eed9267685)
This commit is contained in:
Shauren
2019-07-14 12:06:43 +02:00
parent e7b94603f2
commit 58fb2ef631

View File

@@ -450,7 +450,8 @@ uint32 MySQLConnection::GetServerVersion() const
MySQLPreparedStatement* MySQLConnection::GetPreparedStatement(uint32 index)
{
ASSERT(index < m_stmts.size());
ASSERT(index < m_stmts.size(), "Tried to access invalid prepared statement index %u (max index " SZFMTD ") on database `%s`, connection type: %s",
index, m_stmts.size(), m_connectionInfo.database.c_str(), (m_connectionFlags & CONNECTION_ASYNC) ? "asynchronous" : "synchronous");
MySQLPreparedStatement* ret = m_stmts[index].get();
if (!ret)
TC_LOG_ERROR("sql.sql", "Could not fetch prepared statement %u on database `%s`, connection type: %s.",