From 5d099c85577b8b66a0bc16b250b8ef4ce4e91ce4 Mon Sep 17 00:00:00 2001 From: Richard Frith-Macdonald Date: Tue, 6 Aug 2019 18:52:50 +0100 Subject: [PATCH] fix error in exception text --- ChangeLog | 4 ++++ SQLClientPool.m | 10 +++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index a8a2876..e970138 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2019-08-06 Richard Frith-Macdonald + + * SQLClientPool.m: Fix error specifying query string in exceptions + 2019-07-29 Richard Frith-Macdonald * SQLClient.m: Improve logging of cache queries to indicate that diff --git a/SQLClientPool.m b/SQLClientPool.m index 8311dae..c488b5c 100644 --- a/SQLClientPool.m +++ b/SQLClientPool.m @@ -1284,13 +1284,13 @@ static Class cls = Nil; if ([result count] > 1) { [NSException raise: NSInvalidArgumentException - format: @"Query returns more than one record -\n%@\n", stmt]; + format: @"Query returns more than one record -\n%@\n", query]; } record = [result lastObject]; if (record == nil) { [NSException raise: SQLEmptyException - format: @"Query returns no data -\n%@\n", stmt]; + format: @"Query returns no data -\n%@\n", query]; } return record; } @@ -1319,18 +1319,18 @@ static Class cls = Nil; if ([result count] > 1) { [NSException raise: NSInvalidArgumentException - format: @"Query returns more than one record -\n%@\n", stmt]; + format: @"Query returns more than one record -\n%@\n", query]; } record = [result lastObject]; if (record == nil) { [NSException raise: SQLEmptyException - format: @"Query returns no data -\n%@\n", stmt]; + format: @"Query returns no data -\n%@\n", query]; } if ([record count] > 1) { [NSException raise: NSInvalidArgumentException - format: @"Query returns multiple fields -\n%@\n", stmt]; + format: @"Query returns multiple fields -\n%@\n", query]; } return [[record lastObject] description]; }