mirror of
https://github.com/gnustep/libs-sqlclient.git
synced 2025-02-14 07:31:17 +00:00
fix error in exception text
This commit is contained in:
parent
46cf998afc
commit
5d099c8557
2 changed files with 9 additions and 5 deletions
|
@ -1,3 +1,7 @@
|
|||
2019-08-06 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* SQLClientPool.m: Fix error specifying query string in exceptions
|
||||
|
||||
2019-07-29 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* SQLClient.m: Improve logging of cache queries to indicate that
|
||||
|
|
|
@ -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];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue