From eed92676858c9c10b1bd570894d562b21e72a905 Mon Sep 17 00:00:00 2001 From: Shauren Date: Sun, 14 Jul 2019 12:06:43 +0200 Subject: Core/DB: Improved terrible assertion message --- src/server/database/Database/MySQLConnection.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/server/database/Database/MySQLConnection.cpp') diff --git a/src/server/database/Database/MySQLConnection.cpp b/src/server/database/Database/MySQLConnection.cpp index 7c39204d5d8..08a508ba897 100644 --- a/src/server/database/Database/MySQLConnection.cpp +++ b/src/server/database/Database/MySQLConnection.cpp @@ -441,7 +441,8 @@ void MySQLConnection::Unlock() 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.", -- cgit v1.2.3