[ios, macos] Use NSNumber in exception strings (#7083)

This commit is contained in:
Jesse Bounds
2016-11-15 13:39:09 -08:00
committed by GitHub
parent 5a982f9ccc
commit 068a89c2f8
2 changed files with 6 additions and 6 deletions

View File

@@ -58,8 +58,8 @@ mbgl::Color MGLColorObjectFromCGColorRef(CGColorRef cgColor)
if (range.location + range.length > [self pointCount])
{
[NSException raise:NSRangeException
format:@"Invalid coordinate range %@ extends beyond current coordinate count of %zu",
NSStringFromRange(range), [self pointCount]];
format:@"Invalid coordinate range %@ extends beyond current coordinate count of %@",
NSStringFromRange(range), @([self pointCount])];
}
std::copy(_coordinates.begin() + range.location, _coordinates.begin() + NSMaxRange(range), coords);
@@ -83,8 +83,8 @@ mbgl::Color MGLColorObjectFromCGColorRef(CGColorRef cgColor)
if (NSMaxRange(range) > _coordinates.size())
{
[NSException raise:NSRangeException
format:@"Invalid range %@ for existing coordinate count %zu",
NSStringFromRange(range), [self pointCount]];
format:@"Invalid range %@ for existing coordinate count %@",
NSStringFromRange(range), @([self pointCount])];
}
[self willChangeValueForKey:@"coordinates"];

View File

@@ -54,8 +54,8 @@ NS_ASSUME_NONNULL_BEGIN
if (range.location + range.length > [self pointCount])
{
[NSException raise:NSRangeException
format:@"Invalid coordinate range %@ extends beyond current coordinate count of %zu",
NSStringFromRange(range), [self pointCount]];
format:@"Invalid coordinate range %@ extends beyond current coordinate count of %@",
NSStringFromRange(range), @([self pointCount])];
}
std::copy(_coordinates.begin() + range.location, _coordinates.begin() + NSMaxRange(range), coords);