[_ms appendString:@" ILIKE "];
}
else {
- [self logWithFormat:@"ERROR(%s): unsupported operation for null: %@",
+ [self errorWithFormat:@"%s: unsupported operation for null: %@",
__PRETTY_FUNCTION__, NSStringFromSelector(op)];
}
[_ms appendString:@"'"];
}
else {
- [self logWithFormat:@"ERROR(%s): unsupported value class: %@",
+ [self errorWithFormat:@"%s: unsupported value class: %@",
__PRETTY_FUNCTION__, NSStringFromClass([val class])];
}
}
else if (sel_eq(op, EOQualifierOperatorEqual))
[_ms appendString:@" IS NOT NULL"];
else {
- [self logWithFormat:@"ERROR(%s): invalid operation for null: %@",
+ [self errorWithFormat:@"%s: invalid operation for null: %@",
__PRETTY_FUNCTION__, NSStringFromSelector(op)];
}
}
else if ([_q isKindOfClass:[EOKeyValueQualifier class]])
[self _appendKeyValueQualifier:(id)_q toString:_ms];
else
- NSLog(@"ERROR: unknown qualifier: %@", _q);
+ [self errorWithFormat:@"unknown qualifier: %@", _q];
}
- (void)_gcsAppendToString:(NSMutableString *)_ms {
adaptorName = [[self class] adaptorNameForURLScheme:[_url scheme]];
if ([adaptorName length] == 0) {
- [self logWithFormat:@"ERROR: cannot handle URL: %@", _url];
+ [self errorWithFormat:@"cannot handle URL: %@", _url];
return nil;
}
condict = [self connectionDictionaryForURL:_url];
if ((adaptor = [EOAdaptor adaptorWithName:adaptorName]) == nil) {
- [self logWithFormat:@"ERROR: did not find adaptor '%@' for URL: %@",
+ [self errorWithFormat:@"did not find adaptor '%@' for URL: %@",
adaptorName, _url];
return nil;
}
return nil;
if ((adContext = [adaptor createAdaptorContext]) == nil) {
- [self logWithFormat:@"ERROR: could not create adaptor context!"];
+ [self errorWithFormat:@"could not create adaptor context!"];
return nil;
}
if ((adChannel = [adContext createAdaptorChannel]) == nil) {
- [self logWithFormat:@"ERROR: could not create adaptor channel!"];
+ [self errorWithFormat:@"could not create adaptor channel!"];
return nil;
}
return adChannel;
if ([channel isOpen])
;
else if (![channel openChannel]) {
- [self logWithFormat:@"could not open channel %@ for URL: %@",
+ [self errorWithFormat:@"could not open channel %@ for URL: %@",
channel, [_url absoluteString]];
return nil;
}
folderManager:(GCSFolderManager *)_fm
{
if (![_loc isNotNull]) {
- [self logWithFormat:@"ERROR(%s): missing quicktable parameter!",
- __PRETTY_FUNCTION__];
+ [self errorWithFormat:@"missing quicktable parameter!"];
[self release];
return nil;
}
NSString *sql;
if ((channel = [self acquireStoreChannel]) == nil) {
- [self logWithFormat:@"ERROR(%s): could not open storage channel!",
- __PRETTY_FUNCTION__];
+ [self errorWithFormat:@"could not open storage channel!"];
return nil;
}
/* run SQL */
if ((error = [channel evaluateExpressionX:sql]) != nil) {
- [self logWithFormat:@"ERROR(%s): cannot execute SQL '%@': %@",
+ [self errorWithFormat:@"%s: cannot execute SQL '%@': %@",
__PRETTY_FUNCTION__, sql, error];
[self releaseChannel:channel];
return nil;
NSString *sql;
if ((channel = [self acquireStoreChannel]) == nil) {
- [self logWithFormat:@"ERROR(%s): could not open storage channel!",
+ [self errorWithFormat:@"%s: could not open storage channel!",
__PRETTY_FUNCTION__];
return nil;
}
cContent = [row objectForKey:@"c_content"];
if (![cName isNotNull]) {
- [self logWithFormat:@"ERROR: missing c_name in row: %@", row];
+ [self errorWithFormat:@"missing c_name in row: %@", row];
continue;
}
if (![cContent isNotNull]) {
- [self logWithFormat:@"ERROR: missing c_content in row: %@", row];
+ [self errorWithFormat:@"missing c_content in row: %@", row];
continue;
}
/* open channels */
if ((storeChannel = [self acquireStoreChannel]) == nil) {
- [self logWithFormat:@"ERROR(%s): could not open storage channel!"];
+ [self errorWithFormat:@"%s: could not open storage channel!",
+ __PRETTY_FUNCTION__];
return nil;
}
if (!self->ofFlags.sameTableForQuick) {
if ((quickChannel = [self acquireQuickChannel]) == nil) {
- [self logWithFormat:@"ERROR(%s): could not open quick channel!"];
+ [self errorWithFormat:@"%s: could not open quick channel!",
+ __PRETTY_FUNCTION__];
[self releaseChannel:storeChannel];
return nil;
}
delsql = [delsql stringByAppendingString:@" WHERE c_name="];
delsql = [delsql stringByAppendingString:[self _formatRowValue:_name]];
if ((delErr = [storeChannel evaluateExpressionX:delsql]) != nil) {
- [self logWithFormat:
- @"ERROR(%s): could not delete content '%@' after quick-fail:"
+ [self errorWithFormat:
+ @"%s: could not delete content '%@' after quick-fail:"
@" %@", __PRETTY_FUNCTION__, delsql, error];
}
}
/* open channels */
if ((storeChannel = [self acquireStoreChannel]) == nil) {
- [self logWithFormat:@"ERROR(%s): could not open storage channel!"];
+ [self errorWithFormat:@"could not open storage channel!"];
return nil;
}
if (!self->ofFlags.sameTableForQuick) {
if ((quickChannel = [self acquireQuickChannel]) == nil) {
- [self logWithFormat:@"ERROR(%s): could not open quick channel!"];
+ [self errorWithFormat:@"could not open quick channel!"];
[self releaseChannel:storeChannel];
return nil;
}
delsql = [delsql stringByAppendingString:@" WHERE c_name="];
delsql = [delsql stringByAppendingString:[self _formatRowValue:_name]];
if ((error = [storeChannel evaluateExpressionX:delsql]) != nil) {
- [self logWithFormat:
- @"ERROR(%s): cannot delete content '%@': %@",
+ [self errorWithFormat:
+ @"%s: cannot delete content '%@': %@",
__PRETTY_FUNCTION__, delsql, error];
}
else if (!self->ofFlags.sameTableForQuick) {
delsql = [delsql stringByAppendingString:@" WHERE c_name="];
delsql = [delsql stringByAppendingString:[self _formatRowValue:_name]];
if ((error = [quickChannel evaluateExpressionX:delsql]) != nil) {
- [self logWithFormat:
- @"ERROR(%s): cannot delete quick row '%@': %@",
+ [self errorWithFormat:
+ @"%s: cannot delete quick row '%@': %@",
__PRETTY_FUNCTION__, delsql, error];
/*
Note: we now have a "broken" record, needs to be periodically GCed by
/* open channel */
if ((channel = [self acquireStoreChannel]) == nil) {
- [self logWithFormat:@"ERROR(%s): could not open storage channel!"];
+ [self errorWithFormat:@" could not open storage channel!"];
return nil;
}
/* run SQL */
if ((error = [channel evaluateExpressionX:sql]) != nil) {
- [self logWithFormat:@"ERROR(%s): cannot execute quick-fetch SQL '%@': %@",
+ [self errorWithFormat:@"%s: cannot execute quick-fetch SQL '%@': %@",
__PRETTY_FUNCTION__, sql, error];
[self releaseChannel:channel];
return nil;
/* open channel */
if ((channel = [self acquireAclChannel]) == nil) {
- [self logWithFormat:@"ERROR(%s): could not open acl channel!"];
+ [self errorWithFormat:@"could not open acl channel!"];
return nil;
}
/* run SQL */
if ((error = [channel evaluateExpressionX:sql]) != nil) {
- [self logWithFormat:@"ERROR(%s): cannot execute acl-fetch SQL '%@': %@",
+ [self errorWithFormat:@"%s: cannot execute acl-fetch SQL '%@': %@",
__PRETTY_FUNCTION__, sql, error];
[self releaseChannel:channel];
return nil;