mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-04-23 20:31:13 +08:00
Raise an exception if the fixture fails to parse rather than returning nil
This commit is contained in:
@@ -66,7 +66,9 @@ static NSBundle *fixtureBundle = nil;
|
||||
|
||||
+ (id)parsedObjectWithContentsOfFixture:(NSString *)fixtureName
|
||||
{
|
||||
return [[self fixtureBundle] parsedObjectWithContentsOfResource:fixtureName withExtension:nil];
|
||||
id fixtureObject = [[self fixtureBundle] parsedObjectWithContentsOfResource:fixtureName withExtension:nil];
|
||||
NSAssert(fixtureObject, @"Failed to parse contents of fixture at path '%@'", fixtureName);
|
||||
return fixtureObject;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user