more fixes to format strings and direct isa usage

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@37738 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Sebastian Reitenbach 2014-03-09 08:17:55 +00:00
parent a3abfc976a
commit 97b6302f68
18 changed files with 116 additions and 123 deletions

View file

@ -497,8 +497,7 @@ void addToUsedClasses(NSMutableArray * mutArray,NSSet * knownNames, NSArray * ot
[[eoAttr name] initialCapitalString],
[eoAttr valueClassName], lowStr];
[cs appendFormat:@" [self willChange];\n ASSIGN(_%@, aValue);\n}\n\n",
lowStr, lowStr];
[cs appendFormat:@" [self willChange];\n ASSIGN(_%@, aValue);\n}\n\n", lowStr];
[cs appendFormat:@"- (%@ *) %@\n{\n return _%@;\n}\n\n", [eoAttr valueClassName], [eoAttr name], lowStr];
}
@ -516,8 +515,7 @@ void addToUsedClasses(NSMutableArray * mutArray,NSSet * knownNames, NSArray * ot
[[eoRel name] initialCapitalString],
[[eoRel destinationEntity] className], lowStr];
[cs appendFormat:@" [self willChange];\n ASSIGN(_%@, aValue);\n}\n\n",
lowStr, lowStr];
[cs appendFormat:@" [self willChange];\n ASSIGN(_%@, aValue);\n}\n\n", lowStr];
[cs appendFormat:@"- (%@ *)%@\n{\n return _%@;\n}\n\n", [[eoRel destinationEntity] className], [eoRel name], lowStr];
}

View file

@ -828,7 +828,7 @@ NSString *EOMConsistencyModelObjectKey = @"EOMConsistencyModelObjectKey";
count = [attributes count];
attrb = [[EOAttribute alloc] init];
[attrb setName: [NSString stringWithFormat: @"Attribute%d", count]];
[attrb setName: [NSString stringWithFormat: @"Attribute%"PRIuPTR, count]];
[attrb setColumnName: [attrb name]];
[attrb setValueClassName: @"NSString"];
[attrb setExternalType: @""];
@ -853,7 +853,7 @@ NSString *EOMConsistencyModelObjectKey = @"EOMConsistencyModelObjectKey";
NSUInteger count;
count = [[_eomodel storedProcedureNames] count];
sProc = [[EOStoredProcedure alloc] initWithName:[NSString stringWithFormat:@"Procedure%d", count]];
sProc = [[EOStoredProcedure alloc] initWithName:[NSString stringWithFormat:@"Procedure%"PRIuPTR, count]];
[_eomodel addStoredProcedure:sProc];
RELEASE(sProc);
@ -868,7 +868,7 @@ NSString *EOMConsistencyModelObjectKey = @"EOMConsistencyModelObjectKey";
count = [[_eomodel entityNames] count];
newEntity = [[EOEntity alloc] init];
[newEntity setName:[NSString stringWithFormat:@"Entity%d", count]];
[newEntity setName:[NSString stringWithFormat:@"Entity%"PRIuPTR, count]];
[newEntity setClassName:@"EOGenericRecord"];
[_eomodel addEntity:newEntity];
@ -891,7 +891,7 @@ NSString *EOMConsistencyModelObjectKey = @"EOMConsistencyModelObjectKey";
newRel = [[EORelationship alloc] init];
[newRel setName:[NSString stringWithFormat:@"Relationship%d", count]];
[newRel setName:[NSString stringWithFormat:@"Relationship%"PRIuPTR, count]];
[selectedEntity addRelationship:newRel];

View file

@ -171,7 +171,7 @@
mDict = [NSMutableDictionary dictionaryWithObjectsAndKeys:
@"newValue", @"value",
[NSString stringWithFormat:@"newKey%d", aCount],@"key", nil];
[NSString stringWithFormat:@"newKey%"PRIuPTR, aCount],@"key", nil];
[_dataArray addObject:mDict];
[_tableView reloadData];

View file

@ -15,6 +15,23 @@
* EOControl/EOPrivate.m
* EOControl/EOQualifier.m
* EOControl/EOSortOrdering.m
* Apps/EOModelEditor/CodeGenerator.m
* Apps/EOModelEditor/EOMEDocument.m
* Apps/EOModelEditor/Inspectors/ConnectionDictionaryInspector.m
* EOAccess/EOAccessFault.m
* EOAccess/EOAdaptorChannel.m
* EOAccess/EOAdaptor.m
* EOAccess/EOAttribute.m
* EOAccess/EODatabaseChannel.m
* EOAccess/EODatabaseContext.m
* EOAccess/EODatabaseDataSource.m
* EOAccess/EOEntity.m
* EOAccess/EOModelGroup.m
* EOAccess/EOModel.m
* EOAccess/EORelationship.m
* EOAccess/EOUtilities.m
* EOAdaptors/PostgreSQLAdaptor/PostgreSQLChannel.m
* EOAdaptors/PostgreSQLAdaptor/PostgreSQLContext.m
fix format string warnings and do not directly access isa
2014-03-08 Sebastian Reitenbach <sebastia@l00-bugdead-prods.de>

View file

@ -264,7 +264,7 @@ NSString *EOAccessFaultObjectNotAvailableException = @"EOAccessFaultObjectNotAva
// we should avoid putting self here as this will fire a fault again...
[NSException raise: EOAccessFaultObjectNotAvailableException
format: @"%@ -- %@ 0x%x: cannot fault to-one for object of class %@ databaseContext %@ handler %@ (globalID=%@)",
format: @"%@ -- %@ 0x%p: cannot fault to-one for object of class %@ databaseContext %@ handler %@ (globalID=%@)",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
object,

View file

@ -106,7 +106,7 @@ NSString *EOAdministrativeConnectionDictionaryKey
if (!adaptorName)
[NSException raise: NSInvalidArgumentException
format: @"%@ -- %@ 0x%x: no adaptor name in model named %@",
format: @"%@ -- %@ 0x%p: no adaptor name in model named %@",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self,
@ -145,7 +145,7 @@ NSString *EOAdministrativeConnectionDictionaryKey
/* Check error */
if ([name length] == 0)
[NSException raise: NSInvalidArgumentException
format: @"%@ -- %@ 0x%x: adaptor name can't be nil",
format: @"%@ -- %@ 0x%p: adaptor name can't be nil",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self];
@ -195,7 +195,7 @@ NSString *EOAdministrativeConnectionDictionaryKey
/* Check bundle */
if (!bundle)
[NSException raise: NSInvalidArgumentException
format: @"%@ -- %@ 0x%x: the adaptor bundle '%@' does not exist",
format: @"%@ -- %@ 0x%p: the adaptor bundle '%@' does not exist",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self,
@ -225,7 +225,7 @@ NSString *EOAdministrativeConnectionDictionaryKey
if(adaptorClass == Nil)
{
[NSException raise: NSInvalidArgumentException
format: @"%@ -- %@ 0x%x: value of EOAdaptorClassName '%@' for adaptor '%@' is not a valid class and bundle does not contain a principal class",
format: @"%@ -- %@ 0x%p: value of EOAdaptorClassName '%@' for adaptor '%@' is not a valid class and bundle does not contain a principal class",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self,
@ -236,7 +236,7 @@ NSString *EOAdministrativeConnectionDictionaryKey
if ([adaptorClass isSubclassOfClass: [self class]] == NO)
{
[NSException raise: NSInvalidArgumentException
format: @"%@ -- %@ 0x%x: principal class is not a subclass of EOAdaptor:%@",
format: @"%@ -- %@ 0x%p: principal class is not a subclass of EOAdaptor:%@",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self,
@ -466,7 +466,7 @@ NSString *EOAdministrativeConnectionDictionaryKey
//OK
if ([self hasOpenChannels])
[NSException raise: NSInvalidArgumentException
format: @"%@ -- %@ 0x%x: cannot set the connection dictionary while the adaptor is connected!",
format: @"%@ -- %@ 0x%p: cannot set the connection dictionary while the adaptor is connected!",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self];

View file

@ -131,7 +131,7 @@ inRowDescribedByQualifier: (EOQualifier *)qualifier
if(rows != 1)
[NSException raise: NSInvalidArgumentException
format: @"%@ -- %@ 0x%x: updated %d rows",
format: @"%@ -- %@ 0x%p: updated %"PRIuPTR" rows",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self,
@ -149,14 +149,14 @@ inRowDescribedByQualifier: (EOQualifier *)qualifier
- (void)deleteRowDescribedByQualifier: (EOQualifier *)qualifier
entity: (EOEntity *)entity
{
int rows = 0;
NSUInteger rows = 0;
rows = [self deleteRowsDescribedByQualifier: qualifier
entity: entity];
if (rows != 1)
[NSException raise: NSInvalidArgumentException
format: @"%@ -- %@ 0x%x: deleted %d rows",
format: @"%@ -- %@ 0x%p: deleted %"PRIuPTR" rows",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self,
@ -221,7 +221,7 @@ inRowDescribedByQualifier: (EOQualifier *)qualifier
if(row == nil || [self fetchRowWithZone: NULL] != nil)
{
[NSException raise: EOGeneralAdaptorException
format: @"%@ -- %@ 0x%x: cannot lock row for entity '%@' with qualifier: %@",
format: @"%@ -- %@ 0x%p: cannot lock row for entity '%@' with qualifier: %@",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self,
@ -247,7 +247,7 @@ inRowDescribedByQualifier: (EOQualifier *)qualifier
if(isEqual == NO)
{
[NSException raise: EOGeneralAdaptorException
format: @"%@ -- %@ 0x%x: cannot lock row for entity '%@' with qualifier: %@",
format: @"%@ -- %@ 0x%p: cannot lock row for entity '%@' with qualifier: %@",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self,
@ -574,7 +574,7 @@ prepareInsertExpressionWithRow:changedValues
default:
[NSException raise: NSInvalidArgumentException
format: @"%@ -- %@ 0x%x: Operator %d is not defined",
format: @"%@ -- %@ 0x%p: Operator %d is not defined",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self,
@ -630,7 +630,7 @@ prepareInsertExpressionWithRow:changedValues
forKey: EOAdaptorFailureKey];
exp = [NSException exceptionWithName: EOGeneralAdaptorException
reason: [NSString stringWithFormat:@"%@ -- %@ 0x%x: failed with exception name:%@ reason:\"%@\"",
reason: [NSString stringWithFormat:@"%@ -- %@ 0x%p: failed with exception name:%@ reason:\"%@\"",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self,

View file

@ -322,7 +322,7 @@ RCS_ID("$Id$")
default:
methodArg = nil;
[NSException raise: NSInternalInconsistencyException
format: @"%@ -- %@ 0x%x: Invalid value for _argumentType:%d",
format: @"%@ -- %@ 0x%p: Invalid value for _argumentType:%d",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self, _argumentType];
@ -779,7 +779,7 @@ RCS_ID("$Id$")
if (exc)
return [NSException exceptionWithName: NSInvalidArgumentException
reason: [NSString stringWithFormat:@"%@ -- %@ 0x%x: argument \"%@\" contains invalid char '%c'",
reason: [NSString stringWithFormat:@"%@ -- %@ 0x%p: argument \"%@\" contains invalid char '%c'",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self,
@ -817,7 +817,7 @@ RCS_ID("$Id$")
if (exc)
{
return [NSException exceptionWithName: NSInvalidArgumentException
reason: [NSString stringWithFormat: @"%@ -- %@ 0x%x: \"%@\" already used in the model",
reason: [NSString stringWithFormat: @"%@ -- %@ 0x%p: \"%@\" already used in the model",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self,
@ -935,7 +935,7 @@ return nexexp
{
if(!yn && ([self isDerived] && ![self isFlattened]))
[NSException raise: NSInvalidArgumentException
format: @"%@ -- %@ 0x%x: cannot set to NO while the attribute is derived but not flattened.",
format: @"%@ -- %@ 0x%p: cannot set to NO while the attribute is derived but not flattened.",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self];

View file

@ -308,7 +308,7 @@ RCS_ID("$Id$")
if (![self isFetchInProgress])
{
[NSException raise: NSInvalidArgumentException
format: @"%@ -- %@ 0x%x: no fetch in progress",
format: @"%@ -- %@ 0x%p: no fetch in progress",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self];
@ -760,7 +760,7 @@ RCS_ID("$Id$")
if([_databaseContext updateStrategy] == EOUpdateWithPessimisticLocking
&& ![[_databaseContext adaptorContext] transactionNestingLevel])
[NSException raise:NSInvalidArgumentException
format:@"%@ -- %@ 0x%x: no transaction in progress",
format:@"%@ -- %@ 0x%p: no transaction in progress",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self];
@ -771,7 +771,7 @@ RCS_ID("$Id$")
shouldSelectObjectsWithFetchSpecification:fetch
databaseChannel:self])
[NSException raise:EOGeneralDatabaseException
format:@"%@ -- %@ 0x%x: delegate refuses to select objects",
format:@"%@ -- %@ 0x%p: delegate refuses to select objects",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self];

View file

@ -326,7 +326,7 @@ static Class _contextClass = Nil;
if (_dbOperationsByGlobalID)
{
NSDebugMLog(@"MEMORY: dbOperationsByGlobalID count=%u",
NSDebugMLog(@"MEMORY: dbOperationsByGlobalID count=%"PRIuPTR,
NSCountMapTable(_dbOperationsByGlobalID));
NSFreeMapTable(_dbOperationsByGlobalID);
_dbOperationsByGlobalID = NULL;
@ -349,7 +349,7 @@ static Class _contextClass = Nil;
if (_nonPrimaryKeyGenerators)
{
NSDebugMLog(@"MEMORY: nonPrimaryKeyGnerators count=%u",
NSDebugMLog(@"MEMORY: nonPrimaryKeyGnerators count=%"PRIuPTR,
NSCountHashTable(_nonPrimaryKeyGenerators));
NSFreeHashTable(_nonPrimaryKeyGenerators);
@ -571,7 +571,7 @@ May raise an exception if transaction has began or if you want pessimistic lock
{
if (_flags.beganTransaction)
[NSException raise: NSInvalidArgumentException
format: @"%@ -- %@ 0x%x: transaction in progress",
format: @"%@ -- %@ 0x%p: transaction in progress",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self];
@ -580,7 +580,7 @@ May raise an exception if transaction has began or if you want pessimistic lock
if (strategy == EOUpdateWithPessimisticLocking
&& [[_database snapshots] count])
[NSException raise: NSInvalidArgumentException
format: @"%@ -- %@ 0x%x: can't set EOUpdateWithPessimisticLocking when receive's EODatabase already has snapshots",
format: @"%@ -- %@ 0x%p: can't set EOUpdateWithPessimisticLocking when receive's EODatabase already has snapshots",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self];
@ -1573,8 +1573,8 @@ classPropertyNames = [entity classPropertyNames];
if ([entity isAbstractEntity] && (![fetchSpecification isDeep]))
{
[NSException raise:NSInternalInconsistencyException
format:@"A FetchSpecification for an abstract entity must be 'deep'! Entity: ",
entityName];
format:@"A FetchSpecification for an abstract entity must be 'deep'! Entity: %@",
entityName];
}
rawRowKeyPaths = [fetchSpecification rawRowKeyPaths];
@ -4893,12 +4893,12 @@ compareUsingEntityNames(id left, id right, void* vpSortOrders)
RELEASE(handler);
*/
NSDebugMLLog(@"EODatabaseContext",
@"NEAR FINISHED 1 object count=%d %p %@",
@"NEAR FINISHED 1 object count=%"PRIuPTR" %p %@",
[object count],
object,
object);
NSDebugMLLog(@"EODatabaseContext",
@"NEAR FINISHED 1 objects count=%d %p %@",
@"NEAR FINISHED 1 objects count=%"PRIuPTR" %p %@",
[objects count],
objects,
objects);
@ -4907,7 +4907,7 @@ compareUsingEntityNames(id left, id right, void* vpSortOrders)
{
//No, not needed [object removeObjectsInArray:objects];//Because some objects may be here. We don't want duplicate. It's a hack because I don't see why there's objects in object !
NSDebugMLLog(@"EODatabaseContext",
@"NEAR FINISHED 1 object count=%d %p %@",
@"NEAR FINISHED 1 object count=%"PRIuPTR" %p %@",
[object count],
object,
object);
@ -4915,7 +4915,7 @@ compareUsingEntityNames(id left, id right, void* vpSortOrders)
[object addObjectsFromArray: objects];
NSDebugMLLog(@"EODatabaseContext",
@"NEAR FINISHED 2 object count=%d %@",
@"NEAR FINISHED 2 object count=%"PRIuPTR" %@",
[object count],
object);
}
@ -5537,7 +5537,7 @@ compareUsingEntityNames(id left, id right, void* vpSortOrders)
NSDebugMLLog(@"EODatabaseContext",
@"self=%p database=%p [_uniqueStack count]=%d",
@"self=%p database=%p [_uniqueStack count]=%"PRIuPTR,
self, _database,[_uniqueStack count]);
if ([_uniqueStack count] > 0)

View file

@ -136,7 +136,7 @@ RCS_ID("$Id$")
{
if ((entity = [[store database] entityNamed: entityName]) == nil)
[NSException raise: NSInvalidArgumentException
format: @"%@ -- %@ 0x%x: editingContext (%@) cannot handler entity named '%@'",
format: @"%@ -- %@ 0x%p: editingContext (%@) cannot handler entity named '%@'",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self,
@ -145,7 +145,7 @@ RCS_ID("$Id$")
}
else
[NSException raise: NSInvalidArgumentException
format: @"%@ -- %@ 0x%x: editingContext (%@) cannot handler entity named '%@'",
format: @"%@ -- %@ 0x%p: editingContext (%@) cannot handler entity named '%@'",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self,

View file

@ -1693,7 +1693,7 @@ createInstanceWithEditingContext:globalID:zone:
if ([[self attributesByName] objectForKey: relationshipName])
[NSException raise: NSInvalidArgumentException
format: @"%@ -- %@ 0x%x: \"%@\" already used in the model as attribute",
format: @"%@ -- %@ 0x%p: \"%@\" already used in the model as attribute",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self,
@ -1701,7 +1701,7 @@ createInstanceWithEditingContext:globalID:zone:
if ([[self relationshipsByName] objectForKey: relationshipName])
[NSException raise: NSInvalidArgumentException
format: @"%@ -- %@ 0x%x: \"%@\" already used in the model",
format: @"%@ -- %@ 0x%p: \"%@\" already used in the model",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self,
@ -1891,7 +1891,7 @@ createInstanceWithEditingContext:globalID:zone:
if (exc)
return [NSException exceptionWithName: NSInvalidArgumentException
reason: [NSString stringWithFormat:@"%@ -- %@ 0x%x: argument \"%@\" contains invalid char '%c'",
reason: [NSString stringWithFormat:@"%@ -- %@ 0x%p: argument \"%@\" contains invalid char '%c'",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self,
@ -1928,7 +1928,7 @@ createInstanceWithEditingContext:globalID:zone:
if (exc)
{
return [NSException exceptionWithName: NSInvalidArgumentException
reason: [NSString stringWithFormat: @"%@ -- %@ 0x%x: \"%@\" already used in the model",
reason: [NSString stringWithFormat: @"%@ -- %@ 0x%p: \"%@\" already used in the model",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self,
@ -3742,7 +3742,7 @@ toDestinationAttributeInLastComponentOfRelationshipPath: (NSString *)path
if (!*s)
[NSException raise: NSInvalidArgumentException
format: @"%@ -- %@ 0x%x: unterminated character string",
format: @"%@ -- %@ 0x%p: unterminated character string",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self];
@ -3870,7 +3870,7 @@ toDestinationAttributeInLastComponentOfRelationshipPath: (NSString *)path
//EOF don't throw exception. But we do !
[NSException raise: NSInvalidArgumentException
format: @"%@ -- %@ 0x%x: entity name=%@: relationship \"%@\" used in \"%@\" doesn't exist in entity \"%@\"",
format: @"%@ -- %@ 0x%p: entity name=%@: relationship \"%@\" used in \"%@\" doesn't exist in entity \"%@\"",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self,
@ -3970,7 +3970,7 @@ toDestinationAttributeInLastComponentOfRelationshipPath: (NSString *)path
{
//EOF don't throw exception ? But we do !
[NSException raise: NSInvalidArgumentException
format: @"%@ -- %@ 0x%x: attribute \"%@\" used in \"%@\" doesn't exist in entity %@",
format: @"%@ -- %@ 0x%p: attribute \"%@\" used in \"%@\" doesn't exist in entity %@",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self,

View file

@ -500,7 +500,7 @@ NSString *EOEntityLoadedNotification = @"EOEntityLoadedNotification";
NSDictionary *propList = nil;
path = [path stringByStandardizingPath];
modelPath = [isa _formatModelPath: path checkFileSystem: YES];
modelPath = [[self class] _formatModelPath: path checkFileSystem: YES];
NSAssert1(modelPath!=nil, @"Model does not exist at path %@",
path );
name = [[modelPath lastPathComponent] stringByDeletingPathExtension];
@ -669,21 +669,15 @@ NSString *EOEntityLoadedNotification = @"EOEntityLoadedNotification";
{
if ([mgr removeFileAtPath: backupPath handler: nil] == NO)
{
NSString *fmt;
fmt = [NSString stringWithFormat: @"Could not remove %@",
backupPath];
[NSException raise: NSInvalidArgumentException
format: fmt];
format: @"Could not remove %@", backupPath];
}
}
if ([mgr movePath: path toPath: backupPath handler: nil] == NO)
{
NSString *fmt;
fmt = [NSString stringWithFormat: @"Could not move %@ to %@",
path, backupPath];
[NSException raise: NSInvalidArgumentException
format: fmt];
format: @"Could not move %@ to %@", path, backupPath];
}
}
*/
@ -700,11 +694,8 @@ NSString *EOEntityLoadedNotification = @"EOEntityLoadedNotification";
if (writeSingleFile == NO
&& [mgr createDirectoryAtPath: path attributes: nil] == NO)
{
NSString *fmt;
fmt = [NSString stringWithFormat: @"Could not create directory: %@",
path];
[NSException raise: NSInvalidArgumentException
format: fmt];
format: @"Could not create directory: %@", path];
}
}
@ -722,11 +713,8 @@ NSString *EOEntityLoadedNotification = @"EOEntityLoadedNotification";
if ([self _writePlist:entityPList toFile:fileName] == NO)
{
NSString *fmt;
fmt = [NSString stringWithFormat: @"Could not create file: %@",
fileName];
[NSException raise: NSInvalidArgumentException
format: fmt];
format: @"Could not create file: %@", fileName];
}
}
@ -741,11 +729,8 @@ NSString *EOEntityLoadedNotification = @"EOEntityLoadedNotification";
fileName = [path stringByAppendingPathComponent: fileName];
if ([self _writePlist:stProcPList toFile:fileName] == NO)
{
NSString *fmt;
fmt = [NSString stringWithFormat: @"Could not create file: %@",
fileName];
[NSException raise: NSInvalidArgumentException
format: fmt];
format: @"Could not create file: %@", fileName];
}
}
@ -762,22 +747,16 @@ NSString *EOEntityLoadedNotification = @"EOEntityLoadedNotification";
if ([self _writePlist:pList toFile:fileName] == NO)
{
NSString *fmt;
fmt = [NSString stringWithFormat: @"Could not create file: %@",
fileName];
[NSException raise: NSInvalidArgumentException
format: fmt];
format: @"Could not create file: %@", fileName];
}
if (writeSingleFile == NO)
{
NSString *connectionSettingsPath = [path stringByAppendingPathComponent: @"connectionSettings.plist"];
if ([self _writePlist: [self connectionDictionary] toFile: connectionSettingsPath] == NO)
{
NSString *fmt;
fmt = [NSString stringWithFormat: @"Could not create file: %@",
fileName];
[NSException raise: NSInvalidArgumentException
format: fmt];
format: @"Could not create file: %@", fileName];
}
}
}
@ -803,7 +782,7 @@ NSString *EOEntityLoadedNotification = @"EOEntityLoadedNotification";
tableOfContents);
/* The call to _setPath: also sets the name implicitly. */
modelPath = [isa _formatModelPath: path checkFileSystem: YES];
modelPath = [[self class] _formatModelPath: path checkFileSystem: YES];
[self _setPath: modelPath];
EOFLOGObjectLevelArgs(@"gsdb", @"name=%@ path=%@", _name, _path);
@ -961,14 +940,14 @@ NSString *EOEntityLoadedNotification = @"EOEntityLoadedNotification";
{
if (!propertyList)
[NSException raise: NSInvalidArgumentException
format: @"%@ -- %@ 0x%x: must not be the nil object",
format: @"%@ -- %@ 0x%p: must not be the nil object",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self];
if (![propertyList isKindOfClass: [NSDictionary class]])
[NSException raise: NSInvalidArgumentException
format: @"%@ -- %@ 0x%x: must not be kind of NSDictionary class",
format: @"%@ -- %@ 0x%p: must not be kind of NSDictionary class",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self];
@ -1040,7 +1019,7 @@ NSString *EOEntityLoadedNotification = @"EOEntityLoadedNotification";
NS_HANDLER
{
[NSException raise: NSInvalidArgumentException
format: @"%@ -- %@ 0x%x: exception in model '%@' during awakeWithPropertyList: of entity '%@': %@",
format: @"%@ -- %@ 0x%p: exception in model '%@' during awakeWithPropertyList: of entity '%@': %@",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self,
@ -1677,7 +1656,7 @@ NSString *EOEntityLoadedNotification = @"EOEntityLoadedNotification";
{
if ([self storedProcedureNamed: [storedProcedure name]])
[NSException raise: NSInvalidArgumentException
format: @"%@ -- %@ 0x%x: \"%@\" already registered as stored procedure name ",
format: @"%@ -- %@ 0x%p: \"%@\" already registered as stored procedure name ",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self,

View file

@ -241,8 +241,7 @@ of the mainBundle, and all bundles and frameworks loaded into the app.
if (!modelName)
{
[NSException raise: NSInvalidArgumentException
format: [NSString stringWithFormat:
@"The model name is emtpy"]];
format: @"The model name is emtpy"];
}
NSAssert1(modelName, @"No name for model %@", model);
@ -250,8 +249,8 @@ of the mainBundle, and all bundles and frameworks loaded into the app.
if ([_modelsByName objectForKey: modelName])
{
[NSException raise: NSInvalidArgumentException
format: [NSString stringWithFormat: @"The modelname '%@' already exists in modelGroup",
modelName]];
format: @"The modelname '%@' already exists in modelGroup",
modelName];
}
[_modelsByName setObject: model

View file

@ -383,7 +383,7 @@ RCS_ID("$Id$")
NS_HANDLER
{
[NSException raise: NSInvalidArgumentException
format: @"%@ -- %@ 0x%x: cannot create join for relationship '%@': %@",
format: @"%@ -- %@ 0x%p: cannot create join for relationship '%@': %@",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self,
@ -1219,7 +1219,7 @@ relationships. Nil if none" **/
if (exc)
return [NSException exceptionWithName: NSInvalidArgumentException
reason: [NSString stringWithFormat: @"%@ -- %@ 0x%x: argument \"%@\" contains invalid char '%c'",
reason: [NSString stringWithFormat: @"%@ -- %@ 0x%p: argument \"%@\" contains invalid char '%c'",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self,
@ -1259,7 +1259,7 @@ relationships. Nil if none" **/
if (exc)
{
return [NSException exceptionWithName: NSInvalidArgumentException
reason: [NSString stringWithFormat: @"%@ -- %@ 0x%x: \"%@\" already used in the model",
reason: [NSString stringWithFormat: @"%@ -- %@ 0x%p: \"%@\" already used in the model",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self,
@ -1275,7 +1275,7 @@ relationships. Nil if none" **/
//OK
if ([self isFlattened])
[NSException raise: NSInvalidArgumentException
format: @"%@ -- %@ 0x%x: receiver is a flattened relationship",
format: @"%@ -- %@ 0x%p: receiver is a flattened relationship",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self];
@ -1457,7 +1457,7 @@ relationships. Nil if none" **/
if ([self isFlattened] == YES)
[NSException raise: NSInvalidArgumentException
format: @"%@ -- %@ 0x%x: receiver is a flattened relationship",
format: @"%@ -- %@ 0x%p: receiver is a flattened relationship",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self];
@ -1493,7 +1493,7 @@ relationships. Nil if none" **/
if ([sourceAttribute isFlattened] == YES
|| [destinationAttribute isFlattened] == YES)
[NSException raise: NSInvalidArgumentException
format: @"%@ -- %@ 0x%x: join's attributes are flattened",
format: @"%@ -- %@ 0x%p: join's attributes are flattened",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self];
@ -1516,7 +1516,7 @@ relationships. Nil if none" **/
if (sourceEntity
&& ![[joinSourceEntity name] isEqual: [sourceEntity name]])
[NSException raise: NSInvalidArgumentException
format: @"%@ -- %@ 0x%x (%@): join source entity (%@) is not equal to relationship entity (%@)",
format: @"%@ -- %@ 0x%p (%@): join source entity (%@) is not equal to relationship entity (%@)",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self,
@ -1527,7 +1527,7 @@ relationships. Nil if none" **/
&& ![[joinDestinationEntity name]
isEqual: [destinationEntity name]])
[NSException raise: NSInvalidArgumentException
format: @"%@ -- %@ 0x%x (%@): join destination entity (%@) is not equal to relationship destination entity (%@)",
format: @"%@ -- %@ 0x%p (%@): join destination entity (%@) is not equal to relationship destination entity (%@)",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self,
@ -1549,7 +1549,7 @@ relationships. Nil if none" **/
indexOfObject: destinationAttribute]
!= NSNotFound))
[NSException raise: NSInvalidArgumentException
format: @"%@ -- %@ 0x%x: TODO",
format: @"%@ -- %@ 0x%p: TODO",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self];
@ -1595,7 +1595,7 @@ relationships. Nil if none" **/
if ([self isFlattened] == YES)
[NSException raise: NSInvalidArgumentException
format: @"%@ -- %@ 0x%x: receiver is a flattened relationship",
format: @"%@ -- %@ 0x%p: receiver is a flattened relationship",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self];
@ -2239,7 +2239,7 @@ dst entity primaryKeyAttributeNames
break;
default:
[NSException raise: NSInvalidArgumentException
format: @"%@ -- %@ 0x%x: invalid deleteRule code for relationship '%@': %d",
format: @"%@ -- %@ 0x%p: invalid deleteRule code for relationship '%@': %d",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self,
@ -2265,7 +2265,7 @@ dst entity primaryKeyAttributeNames
deleteRule = EODeleteRuleNoAction;
else
[NSException raise: NSInvalidArgumentException
format: @"%@ -- %@ 0x%x: invalid deleteRule string for relationship '%@': %@",
format: @"%@ -- %@ 0x%p: invalid deleteRule string for relationship '%@': %@",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self,

View file

@ -256,7 +256,7 @@ NSString *EOMoreThanOneException = @"EOMoreThanOneException";
}
NS_HANDLER
{
NSDebugMLog(@"exception in EOEditingContext (EOUtilities) objectsMatchingValues:entityNamed:", "");
NSDebugMLog(@"exception in EOEditingContext (EOUtilities) objectsMatchingValues:entityNamed:");
NSLog(@"exception in EOEditingContext (EOUtilities) objectsMatchingValues:entityNamed:");
NSDebugMLog(@"exception=%@", localException);
NSLog(@"exception=%@", localException);

View file

@ -699,7 +699,7 @@ newValueForBytesLengthAttribute (const void *bytes,
}
else
{
int i;
NSUInteger i;
NSUInteger count = [_attributes count];
id valueBuffer[100];
id *values = NULL;
@ -708,7 +708,7 @@ newValueForBytesLengthAttribute (const void *bytes,
if (count > PQnfields(_pgResult))
{
[NSException raise: PostgreSQLException
format: @"attempt to read %d attributes "
format: @"attempt to read %"PRIuPTR" attributes "
@"when the result set has only %d columns",
count, PQnfields(_pgResult)];
}
@ -1063,7 +1063,7 @@ newValueForBytesLengthAttribute (const void *bytes,
if (![self isOpen])
[NSException raise: NSInternalInconsistencyException
format: @"%@ -- %@ 0x%x: attempt to insert rows with no open channel",
format: @"%@ -- %@ 0x%p: attempt to insert rows with no open channel",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self];
@ -1075,7 +1075,7 @@ newValueForBytesLengthAttribute (const void *bytes,
if ([self isFetchInProgress])
[NSException raise: NSInternalInconsistencyException
format: @"%@ -- %@ 0x%x: attempt to insert rows with fetch in progress",
format: @"%@ -- %@ 0x%p: attempt to insert rows with fetch in progress",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self];
@ -1090,7 +1090,7 @@ newValueForBytesLengthAttribute (const void *bytes,
[self _cancelResults]; //No done by WO
NSDebugMLLog(@"gsdb", @"autoBeginTransaction", "");
NSDebugMLLog(@"gsdb", @"autoBeginTransaction");
[adaptorContext autoBeginTransaction: YES];
/*:
row allKeys
@ -1142,7 +1142,7 @@ each key
if ([self _evaluateExpression: sqlexpr withAttributes: nil] == 0) //call evaluateExpression:
[NSException raise: EOGeneralAdaptorException
format: @"%@ -- %@ 0x%x: cannot insert row for entity '%@'",
format: @"%@ -- %@ 0x%p: cannot insert row for entity '%@'",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self,
@ -1162,14 +1162,14 @@ each key
if (![self isOpen])
[NSException raise: NSInternalInconsistencyException
format: @"%@ -- %@ 0x%x: attempt to delete rows with no open channel",
format: @"%@ -- %@ 0x%p: attempt to delete rows with no open channel",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self];
if (!qualifier || !entity)
[NSException raise: NSInvalidArgumentException
format: @"%@ -- %@ 0x%x: qualifier and entity arguments "
format: @"%@ -- %@ 0x%p: qualifier and entity arguments "
@" must not be nil objects",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
@ -1177,7 +1177,7 @@ each key
if ([self isFetchInProgress])
[NSException raise: NSInternalInconsistencyException
format: @"%@ -- %@ 0x%x: attempt to delete rows with fetch in progress",
format: @"%@ -- %@ 0x%p: attempt to delete rows with fetch in progress",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self];
@ -1218,7 +1218,7 @@ each key
//a con autoBeginTransaction
//end
NSDebugMLLog(@"gsdb",@"%@ -- %@ 0x%x: isFetchInProgress=%s",
NSDebugMLLog(@"gsdb",@"%@ -- %@ 0x%p: isFetchInProgress=%s",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self,
@ -1226,14 +1226,14 @@ each key
if (![self isOpen])
[NSException raise: NSInternalInconsistencyException
format: @"%@ -- %@ 0x%x: attempt to select attributes with no open channel",
format: @"%@ -- %@ 0x%p: attempt to select attributes with no open channel",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self];
if ([self isFetchInProgress])
[NSException raise: NSInternalInconsistencyException
format: @"%@ -- %@ 0x%x: attempt to select attributes with fetch in progress",
format: @"%@ -- %@ 0x%p: attempt to select attributes with fetch in progress",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self];
@ -1305,14 +1305,14 @@ each key
if (![self isOpen])
[NSException raise: NSInternalInconsistencyException
format: @"%@ -- %@ 0x%x: attempt to update values with no open channel",
format: @"%@ -- %@ 0x%p: attempt to update values with no open channel",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self];
if ([self isFetchInProgress])
[NSException raise: NSInternalInconsistencyException
format: @"%@ -- %@ 0x%x: attempt to update values with fetch in progress",
format: @"%@ -- %@ 0x%p: attempt to update values with fetch in progress",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self];
@ -1407,7 +1407,7 @@ each key
rows = 0;
NSDebugMLLog(@"gsdb", @"[mrow count]=%d", [mrow count]);
NSDebugMLLog(@"gsdb", @"[mrow count]=%"PRIuPTR, [mrow count]);
if ([mrow count] > 0)
{
@ -1637,7 +1637,7 @@ each key
if ((!_isFetchInProgress) && (!_evaluateExprInProgress)) {
[NSException raise: NSInternalInconsistencyException
format: @"%s -- %@ 0x%x: attempt to describe results with no fetch in progress",
format: @"%s -- %@ 0x%p: attempt to describe results with no fetch in progress",
__PRETTY_FUNCTION__,
NSStringFromClass([self class]),
self];

View file

@ -84,7 +84,7 @@ RCS_ID("$Id$")
if ([self transactionNestingLevel])
[NSException raise: NSInternalInconsistencyException
format: @"%@ -- %@ 0x%x: attempted to begin a transaction within a transaction",
format: @"%@ -- %@ 0x%p: attempted to begin a transaction within a transaction",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self];
@ -93,7 +93,7 @@ RCS_ID("$Id$")
{
if (![_delegate adaptorContextShouldBegin: self])
[NSException raise: PostgreSQLException
format: @"%@ -- %@ 0x%x: delegate refuses",
format: @"%@ -- %@ 0x%p: delegate refuses",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self];
@ -136,7 +136,7 @@ RCS_ID("$Id$")
if ([self transactionNestingLevel] == 0)
[NSException raise: NSInternalInconsistencyException
format: @"%@ -- %@ 0x%x:illegal attempt to commit a transaction when there are none in progress",
format: @"%@ -- %@ 0x%p: illegal attempt to commit a transaction when there are none in progress",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self];
@ -145,7 +145,7 @@ RCS_ID("$Id$")
{
if (![_delegate adaptorContextShouldCommit: self])
[NSException raise: PostgreSQLException
format: @"%@ -- %@ 0x%x: delegate refuses",
format: @"%@ -- %@ 0x%p: delegate refuses",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self];
@ -183,7 +183,7 @@ RCS_ID("$Id$")
if (![self transactionNestingLevel])
{
[NSException raise: NSInternalInconsistencyException
format: @"%@ -- %@ 0x%x:illegal attempt to commit a transaction when there are none in progress",
format: @"%@ -- %@ 0x%p: illegal attempt to commit a transaction when there are none in progress",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self];
@ -193,7 +193,7 @@ RCS_ID("$Id$")
{
if (![_delegate adaptorContextShouldRollback: self])
[NSException raise: PostgreSQLException
format: @"%@ -- %@ 0x%x: delegate refuses",
format: @"%@ -- %@ 0x%p: delegate refuses",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
self];