From 39450c586d1f6bce9b57246dbf29a96643a0fe47 Mon Sep 17 00:00:00 2001 From: Thomas Van Lenten Date: Thu, 11 Jun 2020 17:27:21 -0400 Subject: Add some more assert context. --- Foundation/GTMSQLite.m | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Foundation/GTMSQLite.m b/Foundation/GTMSQLite.m index d3add68..f5d25ba 100644 --- a/Foundation/GTMSQLite.m +++ b/Foundation/GTMSQLite.m @@ -47,7 +47,7 @@ GTM_INLINE CFStringEncoding SqliteTextEncodingToCFStringEncoding(int enc) { CFStringEncoding encoding = kCFStringEncodingUTF8; _GTMDevAssert(enc == SQLITE_UTF16BE || enc == SQLITE_UTF16LE, - @"Passed in encoding was not a UTF16 encoding"); + @"Passed in encoding was not a UTF16 encoding: %d", enc); switch(enc) { case SQLITE_UTF16BE: encoding = kCFStringEncodingUTF16BE; @@ -531,7 +531,8 @@ static void UpperLower8(sqlite3_context *context, int argc, sqlite3_value **argv } _GTMDevAssert(userArgs->textRep == SQLITE_UTF8, - @"Received non UTF8 encoding in UpperLower8"); + @"Received non UTF8 encoding in UpperLower8: %d", + userArgs->textRep); // Worker string, must be mutable for case conversion so order our calls // to only copy once @@ -725,7 +726,8 @@ static void UpperLower16(sqlite3_context *context, // we might as well use the preferred encoding of the original call. _GTMDevAssert(userArgs->textRep == SQLITE_UTF16BE || userArgs->textRep == SQLITE_UTF16LE, - @"Received non UTF8 encoding in UpperLower8"); + @"Received non UTF16 encoding in UpperLower16: %d", + userArgs->textRep); switch (userArgs->textRep) { case SQLITE_UTF16BE: sqlite3_result_text16be(context, returnBuffer, -- cgit v1.2.3